script causing a reload ?

C

Chris W

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.images)
{
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(imgName)
{
if (document.images)
{
imgOn = eval(imgName + "on.src");
document [imgName].src = imgOn;
}
}

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

<A HREF="/" onMouseOver="pic_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="pic_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
 
M

McKirahan

Chris W said:
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.images)
{
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(imgName)
{
if (document.images)
{
imgOn = eval(imgName + "on.src");
document [imgName].src = imgOn;
}
}

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

<A HREF="/" onMouseOver="pic_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="pic_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


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.
 
L

Lee

Chris W said:
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.

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.
 
C

Chris W

McKirahan said:
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.


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
 
M

McKirahan

Chris W said:
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

"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?
 
C

Chris W

Lee said:
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.

There is no form on that page..... you can see the whole thing here
http://cdw.homelinux.com:8086/Cart.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
 
C

Chris W

Lee said:
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.

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
 
@

@SM

Chris W a ecrit :
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?

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
 
C

Chris W

Lee said:
This line:
<body BGCOLOR="#FFFFFF" 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.

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
 
L

Lee

Chris W said:
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.

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top