theARTboy
where art meets design
loading the iFrame with JS
Categories: javascript

Reveal demo using the jQuery Modal Reveal plugin. I am working on how to get it to not load the SWF until the hidden div is revealed. It works in a stand alone PHP file but either wordpress or reveal is breaking it. As is apparent, the SWF loads tiny and the height and width info is not passing correctly. Next I will experiment using POST on the flashLoader page instead of GET with URL variables.




Demo

The meat of the operation in effect so far is:
[javascript]
<script type="text/javascript">
function showiFrame(){
var path="http://www.theartboy.net/demos/loadFlash/loadFlash.php?path=ship.swf\u0026width=800\u0026height=500";
var pathURL=encodeURIComponent(path);
$("iframe").attr("src",decodeURIComponent(pathURL));
$("iframe").attr("width","800");
$("iframe").attr("height","500");
}
function hideiFrame(){
//$("iframe").attr("src","");
}
</script>
[/javascript]


×

1 Comment to “loading the iFrame with JS”

  1. DanielRMesa3 says:

    The REVEAL kit… lovin it. =)

Leave a Reply

You must be logged in to post a comment.