Reusing same windows with HTTPS links

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

    Reusing same windows with HTTPS links

    I have links that open https secondary windows using:

    window.open(url , windowName);

    The windowName is always the same but I keep getting new windows. Is
    it possible for each of the links to open in the same window?

    Thanks,

    Jon
  • Kien

    #2
    Re: Reusing same windows with HTTPS links

    Hi,
    window.open() will always open new ones.
    Try windowName.loca tion=url

    Kien

    jon@jkworld.com (Jon) wrote in message news:<90fa470d. 0401051140.6e19 0a1@posting.goo gle.com>...[color=blue]
    > I have links that open https secondary windows using:
    >
    > window.open(url , windowName);
    >
    > The windowName is always the same but I keep getting new windows. Is
    > it possible for each of the links to open in the same window?
    >
    > Thanks,
    >
    > Jon[/color]

    Comment

    • Lasse Reichstein Nielsen

      #3
      Re: Reusing same windows with HTTPS links


      caoxuankien@hot mail.com (Kien) writes:
      [color=blue]
      > jon@jkworld.com (Jon) wrote in message news:<90fa470d. 0401051140.6e19 0a1@posting.goo gle.com>...[/color]
      [color=blue][color=green]
      >> I have links that open https secondary windows using:
      >>
      >> window.open(url , windowName);
      >>
      >> The windowName is always the same but I keep getting new windows. Is
      >> it possible for each of the links to open in the same window?[/color][/color]

      They should. Can you show us the page that fails?

      [top post fixed]
      [color=blue]
      > window.open() will always open new ones.[/color]

      Not if the windowName is the same, and is a valid window name.
      [color=blue]
      > Try windowName.loca tion=url[/color]

      That will rarely work. If "windowName " is the name of the window that
      is opened, it doesn't become a global variable. If it is the name of a
      sub-frame, it will only be a global variable in some browsers.

      If you man to write

      var windowName = window.open(... )
      and then
      windowName.loca tion = url
      then it will probably work (if window.open does :)

      /L
      --
      Lasse Reichstein Nielsen - lrn@hotpop.com
      DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
      'Faith without judgement merely degrades the spirit divine.'

      Comment

      • Jon

        #4
        Re: Reusing same windows with HTTPS links

        Here is my code:

        in the .jsp file:
        <a target="NEWWIND OW"
        href="javascrip t:formNewWindow ('<%=ers.getURL ()%>')"
        class="sbLinkBl ue">View Detail</a>

        in newWindow.js file
        function formNewWindow(u rl)
        {
        var windowName ='NEWWINDOW';
        window.open(url ,windowName);
        }

        Every time View Detail is clicked on the same page or different pages,
        a new window is created. The link always begins with https. I tested
        the above with http and it works fine.

        Jon

        Lasse Reichstein Nielsen <lrn@hotpop.com > wrote in message news:<isjpga74. fsf@hotpop.com> ...[color=blue]
        > caoxuankien@hot mail.com (Kien) writes:
        >[color=green]
        > > jon@jkworld.com (Jon) wrote in message news:<90fa470d. 0401051140.6e19 0a1@posting.goo gle.com>...[/color]
        >[color=green][color=darkred]
        > >> I have links that open https secondary windows using:
        > >>
        > >> window.open(url , windowName);
        > >>
        > >> The windowName is always the same but I keep getting new windows. Is
        > >> it possible for each of the links to open in the same window?[/color][/color]
        >
        > They should. Can you show us the page that fails?
        >
        > [top post fixed]
        >[color=green]
        > > window.open() will always open new ones.[/color]
        >
        > Not if the windowName is the same, and is a valid window name.
        >[color=green]
        > > Try windowName.loca tion=url[/color]
        >
        > That will rarely work. If "windowName " is the name of the window that
        > is opened, it doesn't become a global variable. If it is the name of a
        > sub-frame, it will only be a global variable in some browsers.
        >
        > If you man to write
        >
        > var windowName = window.open(... )
        > and then
        > windowName.loca tion = url
        > then it will probably work (if window.open does :)
        >
        > /L[/color]

        Comment

        • Thomas 'PointedEars' Lahn

          #5
          Re: Reusing same windows with HTTPS links

          Jon wrote:
          [color=blue]
          > in newWindow.js file
          > function formNewWindow(u rl)
          > {
          > var windowName ='NEWWINDOW';
          > window.open(url ,windowName);
          > }
          >
          > Every time View Detail is clicked on the same page or different pages,
          > a new window is created. The link always begins with https.[/color]

          The URI of the link, not the link itself.
          [color=blue]
          > I tested the above with http and it works fine.[/color]

          Of course it works, but

          window.open(url , "NEWWINDOW" );

          works as well as

          window.open(url , "foobar");

          does. There is no additional variable necessary and the value of
          the second argument, if different from "_blank", should not matter
          if it is the same on every call. That the behavior depends on the
          protocol used in the first argument's value could only be a
          browser-dependent feature to prevent going around the Same Origin
          Policy.
          [color=blue]
          > [Top post][/color]

          Do not do that.


          PointedEars

          Comment

          Working...