Saturday, 15 May 2010

javascript - Disable Parent Window after open.window -



javascript - Disable Parent Window after open.window -

i want link amazon music preview player popup site. have code:

<a href="http://www.amazon.de/gp/recsradio/radio/b000002ok3/" target="_blank" onclick="window.open(this.href,'popper','scrollbars=1,width=900,height=600'); homecoming false;" onkeypress="window.open(this.href,'popper','scrollbars=1,width=900,height=600'); homecoming false;">link</a>

my problem is, when click on album cover in amazon popup, parent site link refreshs target amazon url. when open popup url typing url in adressbar , click on cover, new window opend target url (this want force).

is possible don't pass parent relation link popup window?

make sure not using "popper" identifier both instances of winow.open. main 1 opens initial popup should different 1 within popup itself, unless want alter popup open (in case, window.open in onclick attribute unnecessary).

what mean this: launching original popup code in question this:

<a href="popup.html" onclick="window.open(this.href, 'popper'); homecoming false;">popup</a>

and popup code in question (popup.html):

<a href="http://www.amazon.de/gp/recsradio/radio/b000002ok3/" target="_blank" onclick="window.open(this.href,'popper','scrollbars=1,width=900,height=600'); homecoming false;" onkeypress="window.open(this.href,'popper','scrollbars=1,width=900,height=600'); homecoming false;">link</a>

you need create sure original popup identifier different 1 in popup. so, original popup should like:

<a href="popup.html" onclick="window.open(this.href, 'original-popper'); homecoming false;">popup</a>

javascript popup onclick window parent

No comments:

Post a Comment