netscape link problem

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

    netscape link problem

    I made an html-page with this line in it:

    <A HREF="http://www.bla.com" onClick="javasc ript:window.clo se()"
    target="moeder" >link</A>

    It works very well in Internet Explorer, but in Netscape 7 the url isn't
    opened in the moeder window. How come and how can I fix it so it works in
    Netscape too? Thanks in advance for any answers.

    Mrco



  • Grant Wagner

    #2
    Re: netscape link problem

    Marco wrote:
    [color=blue]
    > I made an html-page with this line in it:
    >
    > <A HREF="http://www.bla.com" onClick="javasc ript:window.clo se()"
    > target="moeder" >link</A>
    >
    > It works very well in Internet Explorer, but in Netscape 7 the url isn't
    > opened in the moeder window. How come and how can I fix it so it works in
    > Netscape too? Thanks in advance for any answers.
    >
    > Mrco[/color]

    <a href="http://www.bla.com"
    target="moeder"
    onclick="window .open(this.href , this.target);wi ndow.close();re turn
    false;">link</a>

    Note that if the window you are trying to close wasn't opened by script,
    Netscape will fail with an error in the JavaScript Console of: "Scripts may
    not close windows that were not opened by script."

    --
    | Grant Wagner <gwagner@agrico reunited.com>

    * Client-side Javascript and Netscape 4 DOM Reference available at:
    *


    * Internet Explorer DOM Reference available at:
    *
    Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


    * Netscape 6/7 DOM Reference available at:
    * http://www.mozilla.org/docs/dom/domref/
    * Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
    * http://www.mozilla.org/docs/web-deve...upgrade_2.html


    Comment

    • Marco

      #3
      Re: netscape link problem


      "Grant Wagner" <gwagner@agrico reunited.com> wrote in message
      news:3F17F470.1 C763F50@agricor eunited.com...[color=blue]
      > Marco wrote:
      >[color=green]
      > > I made an html-page with this line in it:
      > >
      > > <A HREF="http://www.bla.com" onClick="javasc ript:window.clo se()"
      > > target="moeder" >link</A>
      > >
      > > It works very well in Internet Explorer, but in Netscape 7 the url isn't
      > > opened in the moeder window. How come and how can I fix it so it works[/color][/color]
      in[color=blue][color=green]
      > > Netscape too? Thanks in advance for any answers.
      > >
      > > Mrco[/color]
      >
      > <a href="http://www.bla.com"
      > target="moeder"
      > onclick="window .open(this.href , this.target);wi ndow.close();re turn
      > false;">link</a>[/color]

      Thanks for the reply, but moeder already exists and this opens a new window.
      I want to open the url in the existing moeder window.
      [color=blue]
      > Note that if the window you are trying to close wasn't opened by script,
      > Netscape will fail with an error in the JavaScript Console of: "Scripts[/color]
      may[color=blue]
      > not close windows that were not opened by script."[/color]

      Yeah, I know. Unfortunately I am not the one who decides how the window is
      opened. Different project. Can't have it all. :)

      Regards,

      Marco


      Comment

      • Marco

        #4
        Re: netscape link problem


        "Grant Wagner" <gwagner@agrico reunited.com> wrote in message
        news:3F17F470.1 C763F50@agricor eunited.com...[color=blue]
        > Marco wrote:
        >[color=green]
        > > I made an html-page with this line in it:
        > >
        > > <A HREF="http://www.bla.com" onClick="javasc ript:window.clo se()"
        > > target="moeder" >link</A>
        > >
        > > It works very well in Internet Explorer, but in Netscape 7 the url isn't
        > > opened in the moeder window. How come and how can I fix it so it works[/color][/color]
        in[color=blue][color=green]
        > > Netscape too? Thanks in advance for any answers.
        > >
        > > Mrco[/color]
        >
        > <a href="http://www.bla.com"
        > target="moeder"
        > onclick="window .open(this.href , this.target);wi ndow.close();re turn
        > false;">link</a>[/color]

        Thanks for the reply, but moeder already exists and this opens a new window.
        I want to open the url in the existing moeder window.
        [color=blue]
        > Note that if the window you are trying to close wasn't opened by script,
        > Netscape will fail with an error in the JavaScript Console of: "Scripts[/color]
        may[color=blue]
        > not close windows that were not opened by script."[/color]

        Yeah, I know. Unfortunately I am not the one who decides how the window is
        opened. Different project. Can't have it all. :)

        Regards,

        Marco


        Comment

        • Grant Wagner

          #5
          Re: netscape link problem

          Marco wrote:
          [color=blue]
          > "Grant Wagner" <gwagner@agrico reunited.com> wrote in message
          > news:3F17F470.1 C763F50@agricor eunited.com...[color=green]
          > > Marco wrote:
          > >[color=darkred]
          > > > I made an html-page with this line in it:
          > > >
          > > > <A HREF="http://www.bla.com" onClick="javasc ript:window.clo se()"
          > > > target="moeder" >link</A>
          > > >
          > > > It works very well in Internet Explorer, but in Netscape 7 the url isn't
          > > > opened in the moeder window. How come and how can I fix it so it works[/color][/color]
          > in[color=green][color=darkred]
          > > > Netscape too? Thanks in advance for any answers.
          > > >
          > > > Mrco[/color]
          > >
          > > <a href="http://www.bla.com"
          > > target="moeder"
          > > onclick="window .open(this.href , this.target);wi ndow.close();re turn
          > > false;">link</a>[/color]
          >
          > Thanks for the reply, but moeder already exists and this opens a new window.
          > I want to open the url in the existing moeder window.
          >[color=green]
          > > Note that if the window you are trying to close wasn't opened by script,
          > > Netscape will fail with an error in the JavaScript Console of: "Scripts[/color]
          > may[color=green]
          > > not close windows that were not opened by script."[/color]
          >
          > Yeah, I know. Unfortunately I am not the one who decides how the window is
          > opened. Different project. Can't have it all. :)
          >
          > Regards,
          >
          > Marco[/color]

          When window.open() is called a second time with the same window name (second
          parameter), it loads the content into the same window instance.

          Ignoring the window.close() for a second, please try the following code:

          <a href="http://www.bla.com"
          target="moeder"
          onclick="window .open(this.href , this.target);re turn false;">link 1</a>
          <a href="http://www.yahoo.com"
          target="moeder"
          onclick="window .open(this.href , this.target);re turn false;">link 2</a>

          Tested in IE6SP1, Netscape 4.78, Mozilla 1.5a and Opera 7.11. In all browsers,
          no matter how many times I clicked the links in sequence or one after another, I
          only ever had one new window opened. This is the way window.open() is supposed
          to work.

          --
          | Grant Wagner <gwagner@agrico reunited.com>

          * Client-side Javascript and Netscape 4 DOM Reference available at:
          *


          * Internet Explorer DOM Reference available at:
          *
          Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


          * Netscape 6/7 DOM Reference available at:
          * http://www.mozilla.org/docs/dom/domref/
          * Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
          * http://www.mozilla.org/docs/web-deve...upgrade_2.html


          Comment

          Working...