Open website in Shadowbox using JavaScript

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

Open website in Shadowbox using JavaScript

GeorgeGub
This post was updated on .
Reply | Threaded
Open this post in threaded view
|

Re: Open website in SandBox using JavaScript

GeorgeGub
Anyone? Please, it's really important and i have tryied everything.
Reply | Threaded
Open this post in threaded view
|

Re: Open website in SandBox using JavaScript

otheroom
I'm not quite following what you're trying to accomplish.

Are you trying to have a SB window open at page load?

Do you want to know what javascript to use to open a SB window?

Are you just trying to get an external site to open in a SB iframe?
Reply | Threaded
Open this post in threaded view
|

Re: Open website in SandBox using JavaScript

vikasshah
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Open website in SandBox using JavaScript

GeorgeGub
In reply to this post by otheroom
You are correct, it was a bad explanation. Let me explain in a better way:

I'm oppening a link in a new tab/window by using JavaScript:

window.open('http://www.example.com/','_blank');

This is the same like < a href="http://www.example.com/" target="_blank" >

I just want to open this external website NOT in a new window, but in a Shadowbox iFrame.

It can be done by HTML (< a href="http://www.example.com/" rel="shadowbox" >) but I need to do it using JavaScript. Is there a way?
Reply | Threaded
Open this post in threaded view
|

Re: Open website in SandBox using JavaScript

otheroom
I would think that you could make a javascript call like this:

Shadowbox.open({
        content:    'http://www.site.com/page',
        player:     "iframe",
        title:      "New Window",
        height:     350,
        width:      350
    });

Of course you'd have to have called shadowbox_init() already.
Reply | Threaded
Open this post in threaded view
|

Re: Open website in SandBox using JavaScript

GeorgeGub
Thank you very much! That's exactly what I wanted!

PS: I'm feeling a little stupid because it was quite easy..
Reply | Threaded
Open this post in threaded view
|

Re: Open website in SandBox using JavaScript

Daniel
Does it work for you, mines open the shadow box, but does not show me anything, just the rectangle with the loading image. It does not show me the image or webpage
TK
Reply | Threaded
Open this post in threaded view
|

Re: Open website in SandBox using JavaScript

TK
In reply to this post by otheroom
Hi otheroom
Would you please explain the "you'd have to have called shadowbox_init() already" part.
Please
Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Open website in SandBox using JavaScript

otheroom
The Shadowbox.open() isn't going to do anything unless you've first initialized Shadowbox with Shadowbox.ini()
TK
Reply | Threaded
Open this post in threaded view
|

Re: Open website in SandBox using JavaScript

TK
Thank you otheroom.
I am using a flash site maker software and the action of "execute script" in the action panel can only support standard Javascript, like javascript: window.close (), javascript: window.open.
I use the following script to open an external page.

newwindow=window.open("http://www.website.com/directory/filename.html",'popupwindow',
'width=640,height=480,left=400,top=200');

Is it possible to call the shadowbox_init() with this standard javascript?
thanks