href target Is Not Working In JS Generated Popup Window

Discussion in 'Javascript' started by MotherBored, Jul 5, 2003.

  1. MotherBored

    MotherBored Guest

    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.
    MotherBored, Jul 5, 2003
    #1
    1. Advertising

  2. "MotherBored" <> schreef in bericht
    news:84HNa.4417$2.webusenet.com...
    ....
    >
    > 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
    Janwillem Borleffs, Jul 5, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MotherBored
    Replies:
    1
    Views:
    672
    Janwillem Borleffs
    Jul 5, 2003
  2. Jens Peter Hansen
    Replies:
    7
    Views:
    501
    Randy Webb
    Jun 19, 2004
  3. Raffi
    Replies:
    4
    Views:
    205
    Dr John Stockton
    Aug 12, 2004
  4. saiho.yuen
    Replies:
    3
    Views:
    411
    kaeli
    Sep 14, 2004
  5. Mel
    Replies:
    1
    Views:
    77
    nice.guy.nige
    Apr 23, 2007
Loading...

Share This Page