Click to See Complete Forum and Search --> : javascript popup windows


onepointy
12-30-2005, 09:41 PM
i have a link to a product, i used the javascript popup code. on the new window that pops up, theres a link to order the product. can i make the link close the new window and open the link in a regular browser window? if not how do i make it open in the link in the browser window without closing the popup window? make sense? just got off a 12 hour shift...

Cytael
12-30-2005, 10:29 PM
this question would be better asked over on the JavaScript section of the forums, but since you're here, I believe the code you're looking for goes something like:

<a href="order.html" onClick="parent.location.href='order.html'; window.close();">Order this product</a>

and obviously you'd want to replace order.html with the actual name of your target page.

rhsunderground
12-31-2005, 12:07 AM
moved to javascript.

FromU2ME
12-31-2005, 05:38 AM
If you want to open the document in the window that opened the popup, use this code:

<a href="order.html" onClick="opener.document.location.href='order.html'; window.close();">Order this product</a>

Perhaps not what you asked for, but still :D

onepointy
12-31-2005, 07:49 AM
thanks

onepointy
12-31-2005, 08:00 AM
i coppied and pasted it, it just closes the window. nothing else happens. :/

onepointy
01-02-2006, 04:44 PM
can you give me the code so the window doesnt close with a class="" inside it too?