Add close button in iframe content

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

Add close button in iframe content

Bon Bon
Hi all,

I have done a search for this both on google and in these forums and nothing came up.

Therefore, I have resorted to asking this question:
Is it possible to add a close button in some iframe content that closes the lightbox window and if so how can this be implemented?

Thank you in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Add close button in iframe content

bphnc
this one will do it:

window.parent.Shadowbox.close();


/bphnc
Reply | Threaded
Open this post in threaded view
|

Re: Add close button in iframe content

Bon Bon
That worked a treat. Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Add close button in iframe content

danilor
Really really thanks man
Reply | Threaded
Open this post in threaded view
|

Re: Add close button in iframe content

Prasad
In reply to this post by bphnc
Please excuse my ignorance, i'm trying to move the close button to the top right.

Where do i copy and paste this code to do so?
jon
Reply | Threaded
Open this post in threaded view
|

Re: Add close button in iframe content

jon
In reply to this post by Bon Bon
Good window.parent.Shadowbox.close(); it is fine for me :)
Reply | Threaded
Open this post in threaded view
|

Re: Add close button in iframe content





i am using Shadowbox.js, version 3.0.3


Cheers
acrystal
In reply to this post by bphnc
Hi could you please help, i have tried both of the following and they work for Firefox and Chrome but IE8 doesn't work! any advice?


< A href="#" onclick="window.parent.Shadowbox.close();" >< A href="#" onclick="Shadowbox.close();return false;" >
Reply | Threaded
Open this post in threaded view
|

Re: Add close button in iframe content

Rony
In reply to this post by bphnc
for some reason this just doenst't work for me.. tried it a hundred times in all possible ways