Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

How to launch Shadowbox?

$
0
0

Hello,

 

I thought it would be simple but am stuck.

 

I need to launch a shadowbox from the edge comp.

My shadowbox installation is all fine and I can launch using the <a> tag, Example: <a href="http://www.youtube.com/watch?v=T7MqEEGGpus" rel="nofollow" target="_top" onclick="return openTopSBX(this);" title="Description of the video here"></a>

 

Shadowbox function in my iframe head is as follows:

<script type="text/javascript">

var sbx = window.parent.Shadowbox;

function openTopSBX(el){

  if(sbx){

    sbx.open( { content : el.href

                   , player : 'iframe'

                   , title : el.title||''

                   //could include width/height/options if desired

                   }

                );

    return false;

  }else{ //no Shadowbox in parent window!

    return true;

  }

}

</script>

 

 

Please note: Shadowbox is initialised in the parent page as I am launching it from within an iframe onto the parent.

 

But when working on the edge comp I need to use the attributes as: window.open("URL", "_self");

 

The problem is I can't figure out how to move the attributes from <a> tag to the window.open format.

 

Would really appreciate any help on this!

 

Thanks!


Viewing all articles
Browse latest Browse all 9897

Trending Articles