script causing a reload ?

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

    #1

    script causing a reload ?

    I have this java script page that causes a second entry in my html logs
    that looks like this

    "GET /Cart.html HTTP/1.0" 200 5408
    "GET /Cart.html? HTTP/1.0" 200 5408

    I don't know why the second get is in there, any ideas?

    below is some of the script in question.

    <SCRIPT Language = "JavaScript ">
    if (document.image s)
    {
    pic0off = new Image();
    pic0off.src = "/images/bhome.gif"
    pic1off = new Image();
    pic1off.src = "/images/bmodel.gif"

    pic0on = new Image();
    pic0on.src = "/images/ohome.gif"
    pic1on = new Image();
    pic1on.src = "/images/omodel.gif"
    }

    function pic_aktiv(imgNa me)
    {
    if (document.image s)
    {
    imgOn = eval(imgName + "on.src");
    document [imgName].src = imgOn;
    }
    }

    function pic_passiv(imgN ame)
    {
    if (document.image s)
    {
    imgOff = eval(imgName + "off.src");
    document [imgName].src = imgOff;
    }
    }
    </SCRIPT>

    <A HREF="/" onMouseOver="pi c_aktiv('pic0') "
    onMouseOut="pic _passiv('pic0') "><IMG SRC="/images/bhome.gif" NAME="pic0"
    ALT="Alpha-Omega Productions" WIDTH="38" HEIGHT="25"
    BORDER="0"></A>&nbsp;&nbsp;
    <A HREF="model.htm " onMouseOver="pi c_aktiv('pic1') "
    onMouseOut="pic _passiv('pic1') "><IMG SRC="/images/bmodel.gif"
    NAME="pic1" ALT="Modeling" WIDTH="57" HEIGHT="25"
    BORDER="0"></A>&nbsp;&nbsp;




    --
    Chris W

    "They that can give up essential liberty
    to obtain a little temporary safety
    deserve neither liberty nor safety."
    -- Benjamin Franklin, 1759 Historical Review of Pennsylvania
  • McKirahan

    #2
    Re: script causing a reload ?

    "Chris W" <1qazse4NOSPAM@ cox.net> wrote in message
    news:3FDDD182.8 8D3ABB3@cox.net ...[color=blue]
    > I have this java script page that causes a second entry in my html logs
    > that looks like this
    >
    > "GET /Cart.html HTTP/1.0" 200 5408
    > "GET /Cart.html? HTTP/1.0" 200 5408
    >
    > I don't know why the second get is in there, any ideas?
    >
    > below is some of the script in question.
    >
    > <SCRIPT Language = "JavaScript ">
    > if (document.image s)
    > {
    > pic0off = new Image();
    > pic0off.src = "/images/bhome.gif"
    > pic1off = new Image();
    > pic1off.src = "/images/bmodel.gif"
    >
    > pic0on = new Image();
    > pic0on.src = "/images/ohome.gif"
    > pic1on = new Image();
    > pic1on.src = "/images/omodel.gif"
    > }
    >
    > function pic_aktiv(imgNa me)
    > {
    > if (document.image s)
    > {
    > imgOn = eval(imgName + "on.src");
    > document [imgName].src = imgOn;
    > }
    > }
    >
    > function pic_passiv(imgN ame)
    > {
    > if (document.image s)
    > {
    > imgOff = eval(imgName + "off.src");
    > document [imgName].src = imgOff;
    > }
    > }
    > </SCRIPT>
    >
    > <A HREF="/" onMouseOver="pi c_aktiv('pic0') "
    > onMouseOut="pic _passiv('pic0') "><IMG SRC="/images/bhome.gif" NAME="pic0"
    > ALT="Alpha-Omega Productions" WIDTH="38" HEIGHT="25"
    > BORDER="0"></A>&nbsp;&nbsp;
    > <A HREF="model.htm " onMouseOver="pi c_aktiv('pic1') "
    > onMouseOut="pic _passiv('pic1') "><IMG SRC="/images/bmodel.gif"
    > NAME="pic1" ALT="Modeling" WIDTH="57" HEIGHT="25"
    > BORDER="0"></A>&nbsp;&nbsp;
    >
    >
    >
    >
    > --
    > Chris W
    >
    > "They that can give up essential liberty
    > to obtain a little temporary safety
    > deserve neither liberty nor safety."
    > -- Benjamin Franklin, 1759 Historical Review of Pennsylvania[/color]


    What happens if you change
    <A HREF="/"
    to
    <A HREF="Cart.html "
    ?

    This presumes that the script above is in the "Cart.html" page and that the
    visitor is clicking on that link.


    Comment

    • Chris W

      #3
      Re: script causing a reload ?

      McKirahan wrote:
      [color=blue]
      > What happens if you change
      > <A HREF="/"
      > to
      > <A HREF="Cart.html "
      > ?
      >
      > This presumes that the script above is in the "Cart.html" page and that the
      > visitor is clicking on that link.[/color]


      I don't see how that would change anything. To get the log entries I
      mentioned in my original post all I have to do is type in
      mysite.com/Cart.html and I first get a get for Cart.html then a bunch of
      events for all my graphics, then finally a second get for Cart.html? I
      don't know why the ? is added to the second get either.

      --
      Chris W

      "They that can give up essential liberty
      to obtain a little temporary safety
      deserve neither liberty nor safety."
      -- Benjamin Franklin, 1759 Historical Review of Pennsylvania

      Comment

      • McKirahan

        #4
        Re: script causing a reload ?

        "Chris W" <1qazse4NOSPAM@ cox.net> wrote in message
        news:3FDDE175.E B2497DA@cox.net ...[color=blue]
        > McKirahan wrote:
        >[color=green]
        > > What happens if you change
        > > <A HREF="/"
        > > to
        > > <A HREF="Cart.html "
        > > ?
        > >
        > > This presumes that the script above is in the "Cart.html" page and that[/color][/color]
        the[color=blue][color=green]
        > > visitor is clicking on that link.[/color]
        >
        >
        > I don't see how that would change anything. To get the log entries I
        > mentioned in my original post all I have to do is type in
        > mysite.com/Cart.html and I first get a get for Cart.html then a bunch of
        > events for all my graphics, then finally a second get for Cart.html? I
        > don't know why the ? is added to the second get either.
        >
        > --
        > Chris W
        >
        > "They that can give up essential liberty
        > to obtain a little temporary safety
        > deserve neither liberty nor safety."
        > -- Benjamin Franklin, 1759 Historical Review of Pennsylvania[/color]

        "I don't know why the second get is in there, any ideas?". I gave you an
        idea.

        "I don't see how that would change anything." -- nor do I. Did you try it?


        Comment

        • Lee

          #5
          Re: script causing a reload ?

          Chris W said:[color=blue]
          >
          >I have this java script page that causes a second entry in my html logs
          >that looks like this
          >
          >"GET /Cart.html HTTP/1.0" 200 5408
          >"GET /Cart.html? HTTP/1.0" 200 5408
          >
          >I don't know why the second get is in there, any ideas?
          >
          >below is some of the script in question.[/color]

          You didn't show the right part of the page.
          The second GET, in which the URL ends with a "?" looks like the
          result of a form being submitted.

          Comment

          • Chris W

            #6
            Re: script causing a reload ?

            Lee wrote:
            [color=blue]
            > You didn't show the right part of the page.
            > The second GET, in which the URL ends with a "?" looks like the
            > result of a form being submitted.[/color]

            There is no form on that page..... you can see the whole thing here

            --
            Chris W

            "They that can give up essential liberty
            to obtain a little temporary safety
            deserve neither liberty nor safety."
            -- Benjamin Franklin, 1759 Historical Review of Pennsylvania

            Comment

            • Chris W

              #7
              Re: script causing a reload ?

              Lee wrote:
              [color=blue]
              > You didn't show the right part of the page.
              > The second GET, in which the URL ends with a "?" looks like the
              > result of a form being submitted.[/color]

              I forgot to mention that if I run this from an old version of netscape
              (4.7) The second get looks like this

              "GET /? HTTP/1.0" 304 -

              where every other browser I use sends this get the second time

              "GET /Cart.html? HTTP/1.1" 206 4255

              --
              Chris Woodhouse
              3147 SW 127th St.
              Oklahoma City, OK 73170
              405-691-5206
              N35° 20.492'
              W97° 34.342'

              "They that can give up essential liberty
              to obtain a little temporary safety
              deserve neither liberty nor safety."
              -- Benjamin Franklin, 1759 Historical Review of Pennsylvania

              Comment

              • Lee

                #8
                Re: script causing a reload ?

                Chris W said:[color=blue]
                >
                >Lee wrote:
                >[color=green]
                >> You didn't show the right part of the page.
                >> The second GET, in which the URL ends with a "?" looks like the
                >> result of a form being submitted.[/color]
                >
                >There is no form on that page..... you can see the whole thing here
                >http://cdw.homelinux.com:8086/Cart.html[/color]

                This line:
                <body BGCOLOR="#FFFFF F" TEXT="#000000" LINK="#106BA5" VLINK="#A56B10"
                ALINK="#FF00FF" BACKGROUND="?">

                Is trying to load a background image named "?".
                That's what's causing that second hit.

                Comment

                • @SM

                  #9
                  Re: script causing a reload ?

                  Chris W a ecrit :
                  [color=blue]
                  > I have this java script page that causes a second entry in my html logs
                  > that looks like this
                  >
                  > "GET /Cart.html HTTP/1.0" 200 5408
                  > "GET /Cart.html? HTTP/1.0" 200 5408
                  >
                  > I don't know why the second get is in there, any ideas?[/color]

                  Pearhaps you don't wait enough before you drag your mouse
                  on images ?
                  Wait the satus bar is no more giving informations (loadings)
                  Let time to the pre-load of roll-over 's images


                  --
                  *************** *************** *************** *************** **
                  Stéphane MORIAUX : mailto:stephane OTER-MOImoriaux@wana doo.fr

                  Comment

                  • Chris W

                    #10
                    Re: script causing a reload ?

                    Lee wrote:
                    [color=blue]
                    > This line:
                    > <body BGCOLOR="#FFFFF F" TEXT="#000000" LINK="#106BA5" VLINK="#A56B10"
                    > ALINK="#FF00FF" BACKGROUND="?">
                    >
                    > Is trying to load a background image named "?".
                    > That's what's causing that second hit.[/color]

                    Thanks, that took a long time for me to track down. First I thought it
                    was my cgi script which was running twice because of this, so spent a
                    day fiddling with it and having other people look at it. Finally the
                    thought came to me that it was the java script in my html file that my
                    script used to wrap around it's dynamic out put. Who knows how long it
                    would have taken me before I thought to just look at the plain html.

                    --
                    Chris W

                    "They that can give up essential liberty
                    to obtain a little temporary safety
                    deserve neither liberty nor safety."
                    -- Benjamin Franklin, 1759 Historical Review of Pennsylvania

                    Comment

                    • Lee

                      #11
                      Re: script causing a reload ?

                      Chris W said:[color=blue]
                      >
                      >Lee wrote:
                      >[color=green]
                      >> This line:
                      >> <body BGCOLOR="#FFFFF F" TEXT="#000000" LINK="#106BA5" VLINK="#A56B10"
                      >> ALINK="#FF00FF" BACKGROUND="?">
                      >>
                      >> Is trying to load a background image named "?".
                      >> That's what's causing that second hit.[/color]
                      >
                      >Thanks, that took a long time for me to track down. First I thought it
                      >was my cgi script which was running twice because of this, so spent a
                      >day fiddling with it and having other people look at it. Finally the
                      >thought came to me that it was the java script in my html file that my
                      >script used to wrap around it's dynamic out put. Who knows how long it
                      >would have taken me before I thought to just look at the plain html.[/color]

                      I actually found it by using Netscape 7's "View > Page Info" menu item.
                      I looked at the "Media" tab to see the URLs of all of the images on the
                      page.

                      Comment

                      Working...