Weird error message after upload
Take a look at this:
http://www.meganjack.com/BelfryCottage/index.html or
http://www.meganjack.com/BelfryCottage/index.shtml
Unless something is changed, I'm getting the following error message:
Quote: The requested URL /BelfryCottage/[object HTMLImageElement] was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
?!?!?!?!?!??!? Notice that the page loads in its entirety for a split second before the error message comes up. I've ever seen that one before. Anyone know what could be causing this? Probably something dumb, but I've combed my code over a million times and can't find anything that seems out of place.
ERGH! Nothing but problems lately...
Abhishek Reddy posted this at 04:48 — 15th August 2002.
He has: 3,348 posts
Joined: Jul 2001
You don't have a redirect script or anything on it, do you? Or an image preload?
The page loads, then goes to http://www.meganjack.com/BelfryCottage/[object]
If I remember right, [object] is returned in javascript for undefined variables... (?)
Have you tried the obvious things: re-upload, tried copying to another page that is already working, maybe?
Mark Hensler posted this at 06:03 — 15th August 2002.
He has: 4,048 posts
Joined: Aug 2000
JavaScript error was the first thing I thought of too...
Megan posted this at 13:04 — 15th August 2002.
She has: 11,421 posts
Joined: Jun 1999
See, that's why I wanted to upload it - to ask about that javascript error! It's just a rollover script, but all of my rollovers are working except one, and I can't figure out why that one button won't work.
I'll post the code later when I get home.
Megan
Connect with us on Facebook!
Megan posted this at 00:58 — 16th August 2002.
She has: 11,421 posts
Joined: Jun 1999
Alrighty, here the offending code:
Javascript part
preloadImg("location","images/location.jpg");
preloadImg("locationover","images/location_over.jpg");
// preloading
function preloadImg(imgObjName, imgURL) // load imgURL into browser's cache
{
if (document.images)
{
eval(imgObjName + " = new Image()");
eval(imgObjName + ".src = imgURL");
}
}
// displaying the image
function displayImg(imgObjName, imgTagName) //disp imgObjName in imgTagName
{
if (document.images)
document[imgTagName].src = eval(imgObjName + ".src");
}
<a href="home.shtml" onmouseover = "displayImg('homeover', 'home')" onmouseout = "displayImg('home', 'home')">
<img src="images/home.jpg" name="home" width="136" height="38" alt="Home" border="0" /></a><br />
<a href="accommodations.shtml" onmouseover = "displayImg('accommover', 'accomm')" onmouseout = "displayImg('accomm', 'accomm')">
<img src="images/accomm.jpg" name="accomm" width="136" height="35" alt="Accommodations" border="0" /></a><br />
<a href="rates.shtml" onmouseover = "displayImg('ratesover', 'rates')" onmouseout = "displayImg('rates', 'rates')">
<img src="images/rates.jpg" name="rates" width="136" height="50" alt="Rates and Reservations" border="0" /></a><br />
<a href="guest.shtml" onmouseover = "displayImg('guestover', 'guest')" onmouseout = "displayImg('guest', 'guest')">
<img src="images/guest.jpg" name="guest" width="136" height="56" alt="Guest Comments" border="0" /></a><br />
<strong><a href="location.shtml" onmouseover = "displayImg('locationover', 'location')" onmouseout = "displayImg('location', 'location')">
<img src="images/location.jpg" name="location" width="136" height="36" alt="Location" border="0" /></a><br /></strong>
<a href="contact.shtml" onmouseover = "displayImg('contactover', 'contact')" onmouseout = "displayImg('contact', 'contact')">
<img src="images/contact.jpg" name="contact" width="136" height="39" alt="Contact Us" border="0" /></a><br />
Any ideas? It's probably a silly spelling mistake or something but I can't find it...
Megan
Connect with us on Facebook!
Mark Hensler posted this at 01:12 — 16th August 2002.
He has: 4,048 posts
Joined: Aug 2000
I'll bet it's just because the name is "location." Try naming it something else.
Abhishek Reddy posted this at 03:56 — 16th August 2002.
He has: 3,348 posts
Joined: Jul 2001
Yep.
"location" is short for "window.location", in IE at least.
Suzanne posted this at 04:14 — 16th August 2002.
She has: 5,507 posts
Joined: Feb 2000
http://developer.netscape.com/docs/manuals/communicator/jsguide4/keywords.htm are most of the reserved words.
Identifiers (of which location is one), are words actually in use for functions. Such as, alert, arguments, Array, blur, Boolean, location, name, open, self, et cetera. Page 33 of the Definitive Guide has a full list.
Mark Hensler posted this at 06:39 — 16th August 2002.
He has: 4,048 posts
Joined: Aug 2000
I won! Oh goody, what do I get?
Suzanne posted this at 07:39 — 16th August 2002.
She has: 5,507 posts
Joined: Feb 2000
All the CHEESE you can buy!
The Webmistress posted this at 08:26 — 16th August 2002.
She has: 5,586 posts
Joined: Feb 2001
Somehow these forums have become cheese infested!!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.