href target Is Not Working In JS Generated Popup Window

M

MotherBored

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:eek:pener.document.mapApplet.selectObject(\""+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.
 
J

Janwillem Borleffs

"MotherBored" <[email protected]> schreef in bericht
....
I have two href tags being displayed in the pop-up window. They look
like this:

<td><a
href='javascript:eek:pener.document.mapApplet.selectObject(\""+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:eek:pener.document.mapApplet.selectObject(\""+lyrId+"\","+
rec.getId()+");'>On Map</a></td><td><a
"href='http://host/page.php?id="+rec.getId()+"'
" target=\"_blank\">Detailed Information</a></td>


JW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top