By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,382 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,382 IT Pros & Developers. It's quick & easy.

href target Is Not Working In JS Generated Popup Window

P: n/a
Hello gurus! I am not a javascript person, so I hope there is a simple
answer / solution to this problem I'm having. I'm xposting this to the
HTML group, if perhaps this is an HTML issue.

I have a java applet which allows interaction through javascript. For
example, I can click a point on the applet and a new window will open
containing information about the point I clicked on. The information is
gathered via javascript & displayed in the pop-up window.

I have two href tags being displayed in the pop-up window. They look
like this:

<td><a
href='javascript:opener.document.mapApplet.selectO bject(\""+lyrId+"\","+
rec.getId()+");'>On Map</a></td><td><a
href='http://host/page.php?id="+rec.getId()+"
target=\"_blank\"'>Detailed Information</a></td>

The second one is the one I'm having a problem with. I wish to have
that link open in a *NEW* window (not the pop-up window, nor the
original window with the java applet). Regardless of what target I set
(e.g., _blank, _top, _new), the link always opens in the pop-up window.
I can set <base target="_blank"> in the head section of my HTML
(pop-up window), and that fixes the problem - however, it screws up the
first link which still needs to interact with the java applet window.

What can I do? I just want that one little link to open in a new window.

Thanks for your help.
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"MotherBored" <mo*********@nospam.newgulfwar.com> schreef in bericht
news:84****************@fe01.atl2.webusenet.com...
....

I have two href tags being displayed in the pop-up window. They look
like this:

<td><a
href='javascript:opener.document.mapApplet.selectO bject(\""+lyrId+"\","+
rec.getId()+");'>On Map</a></td><td><a
href='http://host/page.php?id="+rec.getId()+"
target=\"_blank\"'>Detailed Information</a></td>

The second one is the one I'm having a problem with. I wish to have
that link open in a *NEW* window (not the pop-up window, nor the
original window with the java applet). Regardless of what target I set
(e.g., _blank, _top, _new), the link always opens in the pop-up window.
I can set <base target="_blank"> in the head section of my HTML
(pop-up window), and that fixes the problem - however, it screws up the
first link which still needs to interact with the java applet window.

What can I do? I just want that one little link to open in a new window.


I think that this is a matter of displaced quotes.

Try this:

<td><a
href='javascript:opener.document.mapApplet.selectO bject(\""+lyrId+"\","+
rec.getId()+");'>On Map</a></td><td><a
"href='http://host/page.php?id="+rec.getId()+"'
" target=\"_blank\">Detailed Information</a></td>
JW

Jul 20 '05 #2

P: n/a
In article <3f***********************@news.euronet.nl>, "Janwillem Borleffs"
<jw*@jwbfoto.demon.nl> writes:
<td><a
href='javascript:opener.document


http://www.jibbering.com/faq/#FAQ4_24
--
Randy
All code posted is dependent upon the viewing browser
supporting the methods called, and Javascript being enabled.
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.