By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,481 Members | 1,713 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,481 IT Pros & Developers. It's quick & easy.

script causing a reload ?

P: n/a
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
Jul 20 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
"Chris W" <1q***********@cox.net> wrote in message
news:3F***************@cox.net...
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.
Jul 20 '05 #2

P: n/a
McKirahan wrote:
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
Jul 20 '05 #3

P: n/a
"Chris W" <1q***********@cox.net> wrote in message
news:3F***************@cox.net...
McKirahan wrote:
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


"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?
Jul 20 '05 #4

P: n/a
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.

Jul 20 '05 #5

P: n/a
Lee wrote:
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
Jul 20 '05 #6

P: n/a
Lee wrote:
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
Jul 20 '05 #7

P: n/a
Lee
Chris W said:

Lee wrote:
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


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.

Jul 20 '05 #8

P: n/a
@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
--
************************************************** ************
Stéphane MORIAUX : mailto:st*********************@wanadoo.fr

Jul 20 '05 #9

P: n/a
Lee wrote:
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
Jul 20 '05 #10

P: n/a
Lee
Chris W said:

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


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.

Jul 20 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.