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

Javascript object expected error

P: n/a
I had this web site working without problems a day ago. I went to add
some images on one of the pages in my site and now the index.html page
is popping up error messages when ever the page loads in IR6 ! If
anyone can asssit me on this i would appreciate it . the URL is :
terroratthewestwood.com, i havent tried it in netscape but in opera it
doesnt give me an erorr box, its just that the script on the images
page ("URL/gallery.html") doesnt work at all.....i am a script
beginner so excuse me if this is a dumb question....
Jul 23 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
"matt" <me**@buckeye-express.com> wrote in message
news:c6**************************@posting.google.c om
I had this web site working without problems a day ago. I went to add
some images on one of the pages in my site and now the index.html page
is popping up error messages when ever the page loads in IR6 ! If
anyone can asssit me on this i would appreciate it . the URL is :
terroratthewestwood.com, i havent tried it in netscape but in opera it
doesnt give me an erorr box, its just that the script on the images
page ("URL/gallery.html") doesnt work at all.....i am a script
beginner so excuse me if this is a dumb question....


Try downloading Opera (www.opera.com) as it gives more meaningful error
messages, if you enable the script error window.

<BODY onLoad="preloadImages();MM_preloadImages(someimage shere)"

I can't see preloadImages() defined anywhere, only MM_preloadImages()
Jul 23 '05 #2

P: n/a

"matt" <me**@buckeye-express.com> wrote in message
news:c6**************************@posting.google.c om...
I had this web site working without problems a day ago. I went to add
some images on one of the pages in my site and now the index.html page
is popping up error messages when ever the page loads in IR6 ! If
anyone can asssit me on this i would appreciate it . the URL is :
terroratthewestwood.com, i havent tried it in netscape but in opera it
doesnt give me an erorr box, its just that the script on the images
page ("URL/gallery.html") doesnt work at all.....i am a script
beginner so excuse me if this is a dumb question....


I just loooked at this with IE6, FF0.8 and Opera7.5. I didnt get any errors.
I looked at the home page, went through the gallery and a couple of other
pages.

Please supply the exact URL of the troublesome page and include the error
messages that you get.

Thanks

Deryck
Jul 23 '05 #3

P: n/a
On Sun, 19 Sep 2004 14:38:52 +0100, PDannyD
<da*****@REMOVETHISBITscenicplace.freeserve.co.u k> wrote:
"matt" <me**@buckeye-express.com> wrote in message
news:c6**************************@posting.google.c om
[snip]
the URL is : terroratthewestwood.com,
It's better to provide URLs that people can use, rather than ones they
have to edit themselves:

<URL:http://www.terroratthewestwood.com/>

The same goes for the other link:

<URL:http://www.terroratthewestwood.com/gallery.html>
i havent tried it in netscape but in opera it
doesnt give me an erorr box,
Opera won't unless you explicitly tell it to by modifying your preferences
(Multimedia > JavaScript options... > Open JavaScript console on error).
Alternatively, you can open the console manually from the main menu: Tools Advanced > JavaScript console.
Opera does show an error. PDannyD's assessment is correct - there is no
preloadImages function defined on your page.
its just that the script on the images
page ("URL/gallery.html") doesnt work at all [...]


A couple of quick comments about that page:

1) It's not a good idea to modify the cursor to something the user will be
unfamiliar with. Users know that the pointer (hand) cursor is used with
links, so leave it that way.
2) Don't use the language attribute in SCRIPT elements. You don't want
user agents to actually respect those values as the language rules have
changed in different versions and can lead to some unexpected results.
Instead, use the required type attribute:

<script type="text/javascript">

3) You don't need to hide scripts with SGML comments any more. The
technique was needed around five years ago when some browsers didn't know
what to do with a SCRIPT element, but now all browsers in use do
understand the element (even if they do nothing with contents).
Try downloading Opera (www.opera.com) as it gives more meaningful error
messages, if you enable the script error window.


Read the message again a little more closely; the OP used Opera.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #4

P: n/a
"Michael Winter" <M.******@blueyonder.co.invalid> wrote in message
news:opsek0j5six13kvk@atlantis
On Sun, 19 Sep 2004 14:38:52 +0100, PDannyD
<da*****@REMOVETHISBITscenicplace.freeserve.co.u k> wrote:
"matt" <me**@buckeye-express.com> wrote in message
news:c6**************************@posting.google.c om


[snip]


<much snippage>
Try downloading Opera (www.opera.com) as it gives more meaningful
error messages, if you enable the script error window.


Read the message again a little more closely; the OP used Opera.


Doh!
Jul 23 '05 #5

P: n/a
"Deryck" <de****@REMOVElonghope.co.uk> wrote in message news:<2r*************@uni-berlin.de>...
"matt" <me**@buckeye-express.com> wrote in message
news:c6**************************@posting.google.c om...
I had this web site working without problems a day ago. I went to add
some images on one of the pages in my site and now the index.html page
is popping up error messages when ever the page loads in IR6 ! If
anyone can asssit me on this i would appreciate it . the URL is :
terroratthewestwood.com, i havent tried it in netscape but in opera it
doesnt give me an erorr box, its just that the script on the images
page ("URL/gallery.html") doesnt work at all.....i am a script
beginner so excuse me if this is a dumb question....


I just loooked at this with IE6, FF0.8 and Opera7.5. I didnt get any errors.
I looked at the home page, went through the gallery and a couple of other
pages.

Please supply the exact URL of the troublesome page and include the error
messages that you get.

Thanks

Deryck


thanks for looking at this....the exact URL is
www.terroratthewestwood.com...the error message pops up immediately
after the background and navigation loads....(in IE6)...the first
error i get is this:

a Runtime error has occurred Do you Wish to debug?
Line 10
Object Expected

Then when you click on GALLERY, i get the same error but the line
number is 61

however, it is not happening on ALL machines. i am using one with IR6
and it isnt happening, my buddy is using another machine, and it is
happening. Both are WinXP Pro with IE6 installed so i dont knows what
the deal is...Opera is running fine on both of them....looks like an
IE6 setting or a windows update problem maybe?.....
Jul 23 '05 #6

P: n/a

"matt" <me**@buckeye-express.com> wrote in message
news:c6**************************@posting.google.c om...
thanks for looking at this....
No problem, its more interesting than the thing I'm supposed to be working
on :)
the exact URL is
www.terroratthewestwood.com...the error message pops up immediately
after the background and navigation loads....(in IE6)...the first
error i get is this:

a Runtime error has occurred Do you Wish to debug?
Line 10
Object Expected

OK, I definitely didnt get that on any of the 3 browsers that I have
installed.
Then when you click on GALLERY, i get the same error but the line
number is 61

Ditto.
however, it is not happening on ALL machines.
Groan. Dont you hate it when that happens?
i am using one with IR6
and it isnt happening, my buddy is using another machine, and it is
happening. Both are WinXP Pro with IE6 installed so i dont knows what
the deal is...
OK, FWIW I'm using XP with SP2.
Opera is running fine on both of them....looks like an
IE6 setting or a windows update problem maybe?.....


I'd guess the latter. Maybe your friend can install any necessary updates
from the Microsoft site and try again?
Perhaps you can test the site on other machines too to see if a pattern
emerges on all the troublesome machines?

FWIW2, your HTML causes the validator
(http://validator.w3.org/check?verbos...ewestwood.com/)
to complain a great deal - sorry, youve got some work ahead of you if you
want compliance- it's unlikely that the HTML is causing you the problems
that you refer to but it certainly wouldnt hurt to fix them either (post on
alt.html or mail me privately if you need any help with that). You wrote
this with Dreamweaver, yes?

Sorry I cant find a silver bullet for you,
Deryck
Jul 23 '05 #7

P: n/a
Lee
matt said:

I had this web site working without problems a day ago. I went to add
some images on one of the pages in my site and now the index.html page
is popping up error messages when ever the page loads in IR6 ! If
anyone can asssit me on this i would appreciate it . the URL is :
terroratthewestwood.com, i havent tried it in netscape but in opera it
doesnt give me an erorr box, its just that the script on the images
page ("URL/gallery.html") doesnt work at all.....i am a script
beginner so excuse me if this is a dumb question....


As somebody already pointed out, it's complaining because
you refer to "preloadImages()" in the onload handler of your
body tag. You haven't defined a function by that name.

Jul 23 '05 #8

P: n/a
On Sun, 19 Sep 2004 21:42:28 +0100, Deryck wrote:
....
FWIW2, your HTML causes the validator
(http://validator.w3.org/check?verbos...ewestwood.com/)
to complain a great deal - sorry, youve got some work ahead of you if you
want compliance-


Fortunately one part was thoroughly broken...

<HTML>
<HEAD><bgsound src="fx-goodthunder.wav" loop="3">

...like I want that coming through my digital
5.1 speaker system when it's set to volume '11',
playing "Maggie's Farm" (RaTM). ;-)

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
Jul 23 '05 #9

P: n/a

"Lee" <RE**************@cox.net> wrote in message
news:ci********@drn.newsguy.com...
matt said:

As somebody already pointed out, it's complaining because
you refer to "preloadImages()" in the onload handler of your
body tag. You haven't defined a function by that name.


Yes, I see that error message in Opera now (its on all pages) ...not sure
how/why I didnt see it before :(
There are also 2 body tags on the index.html page so the preloadImages()
error can appear twice!

I really think it wouldnt hurt the OP to walk through the HTML now and clean
up a bit:

No DOCTYPE
2 <body> tags
The alt tags for the navigation refer to "Shop Our Store" for the story and
"Forums" for the gallery.
etc, etc...

The OP has clearly put this together from other sites but needs to do a lit
bit more work yet.

If nothing else adding a DOCTYPE and putting all the javascript into a
single file would help enormously, it will make maintenance so much easier.

Deryck
Jul 23 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.