Auto-Lauch iFrame

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Auto-Lauch iFrame

edarias
Hey everyone, hoping for some help on this.

I'd like to know if and how I can setup an Shadowbox iFrame to open up on launch. That is, when a visitor lands on the homepage of a site, I'd like an iFrame of one of our sub-pages to immediately pop-up.

Thank you in advance for your help.

Best Regards
Reply | Threaded
Open this post in threaded view
|

Re: Auto-Lauch iFrame

kroche
<script type="text/javascript"> window.onload = function() { // Open the message Shadowbox.open({ content: 'test.html', player: "iframe", title: "Shadowbox Title", height: 270, width: 700 }); }; </script>
This is the script I use on my website, It will open a shadowbox with the content in it as soon as the page loads. For the content section, just put the url or page name that you want to open.

I believe that you still need to initialize shadowbox though.

Hope this helps,
Key
Reply | Threaded
Open this post in threaded view
|

Re: Auto-Lauch iFrame

jeffarazzi
I can't get it to work. What am I missing?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<title>Untitled Document</title> 
<link rel="stylesheet" type="text/css" href="shadowbox.css">
<script type="text/javascript" src="shadowbox.js"></script><script type="text/javascript"> Shadowbox.init({ }); </script>
<script type="text/javascript"> window.onload = function() { // Open the message Shadowbox.open({ content: 'http://www.bigriveradvertising.com/sandbox/casestory-window-wellpoint.html', player: "html", height: 315, width: 755 }); }; </script>  </head> 

<body> 
This is a test.
</body> 

</html>
Reply | Threaded
Open this post in threaded view
|

Re: Auto-Lauch iFrame

kroche
jeffarazzi wrote
        player:     "html",
This part must be set to iframe, not html. If you were putting HTML code into the content section, rather than a URL, you would use html, but for a URL it is iframe. Changing this should fix your problem.
Just let me know if you need more help,
Key
Reply | Threaded
Open this post in threaded view
|

Re: Auto-Lauch iFrame

jcfaur
works perfect!....thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Auto-Lauch iFrame

jcfaur
Just not in firefox or opera....any advice?
Reply | Threaded
Open this post in threaded view
|

Re: Auto-Lauch iFrame

Naresh
In reply to this post by kroche
Thanks. It's working.....!!!