Help with closing and linking within Shadowbox

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

Help with closing and linking within Shadowbox

damonpla
Hi guys. I have run into a few entries here touching on this subject but cannot find a solution.

From page "A" I click a link and it opens shadowbox...

< a href="someplace.htm" rel="shadowbox;height=350;width=750" title="Someplace"> SomePlace < /a >


Within that shadowbox (someplace.htm), I have artists listed. I would like to be able to click on any of these artists to close shadowbox then goto the artist's page, artist.htm)

< a href="artist.htm" onclick="parent.Shadowbox.close();return false;">Joe the Artist < /a >

I am successful in the close of shadowbox, but not going to artist.htm, still back at page "A"



Any ideas would be greatly appreciated.

Thanks in advance!  
Reply | Threaded
Open this post in threaded view
|

Re: Help with closing and linking within Shadowbox

arttronics
Here is some sample markup to put inside your iFrame page that Shadowbox is using.

<a href="http://www.Shadowbox-js.com/" onClick="setTimeout('window.parent.Shadowbox.close()',0);window.open(this.href); return false;" target="_blank">Shadowbox-JS Homepage</a>

Just replace the href contents with your artist html page location.

The JavaScript setTimeout for closing Shadowbox is needed so that the remaining window.open can be processed.

If you did not want the artists page to be in a new Window/Tab, remove the entire onClick Event and replace with target="_parent" so that the parent Window/Tab is reused.

When posting your markup here on the forum follow these simple steps:

0. Login and paste your markup into the Message Box.
1. Mouse select the markup you just pasted.
2. Press the More Button from the Message Box Toolbar.
3. Select Raw text from the drop down menu. DONE!

If I don't respond to your POST, it's your inability to provide your markup correctly.

Check out a few DEMOS I made that are here in this forum.

Reply | Threaded
Open this post in threaded view
|

Re: Help with closing and linking within Shadowbox

damonpla
Thanks arttronics, worked like a charm!

Any chance you can teach me how to place the close.png on top of all divs??  

Stay well man.
Reply | Threaded
Open this post in threaded view
|

Re: Help with closing and linking within Shadowbox

arttronics
I see that you already started another thread about this new topic.

Please refer to the original thread you posted.

When posting your markup here on the forum follow these simple steps:

0. Login and paste your markup into the Message Box.
1. Mouse select the markup you just pasted.
2. Press the More Button from the Message Box Toolbar.
3. Select Raw text from the drop down menu. DONE!

If I don't respond to your POST, it's your inability to provide your markup correctly.

Check out a few DEMOS I made that are here in this forum.

RTK
Reply | Threaded
Open this post in threaded view
|

Re: Help with closing and linking within Shadowbox

RTK
In reply to this post by arttronics
Hi!

I used the "target=_parent" tag without onClick event. But when click the link, Shadowbox loads parent window fine, but the windows still open.

How to solve it?

Thanks!