href target Is Not Working In JS Generated Popup Window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MotherBored

    href target Is Not Working In JS Generated Popup Window

    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='javascrip t:opener.docume nt.mapApplet.se lectObject(\""+ lyrId+"\","+
    rec.getId()+"); '>On Map</a></td><td><a
    href='http://host/page.php?id="+r ec.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.


  • Janwillem Borleffs

    #2
    Re: href target Is Not Working In JS Generated Popup Window


    "MotherBore d" <motherbored@no spam.newgulfwar .com> schreef in bericht
    news:84HNa.4417 $C5.4220@fe01.a tl2.webusenet.c om...
    ....[color=blue]
    >
    > I have two href tags being displayed in the pop-up window. They look
    > like this:
    >
    > <td><a
    > href='javascrip t:opener.docume nt.mapApplet.se lectObject(\""+ lyrId+"\","+
    > rec.getId()+"); '>On Map</a></td><td><a
    > href='http://host/page.php?id="+r ec.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.[/color]

    I think that this is a matter of displaced quotes.

    Try this:

    <td><a
    href='javascrip t:opener.docume nt.mapApplet.se lectObject(\""+ lyrId+"\","+
    rec.getId()+"); '>On Map</a></td><td><a
    "href='http ://host/page.php?id="+r ec.getId()+"'
    " target=\"_blank \">Detailed Information</a></td>


    JW



    Comment

    • HikksNotAtHome

      #3
      Re: href target Is Not Working In JS Generated Popup Window

      In article <3f07461f$0$288 93$1b62eedf@new s.euronet.nl>, "Janwillem Borleffs"
      <jwb@jwbfoto.de mon.nl> writes:
      [color=blue]
      ><td><a
      >href='javascri pt:opener.docum ent[/color]


      --
      Randy
      All code posted is dependent upon the viewing browser
      supporting the methods called, and Javascript being enabled.

      Comment

      Working...