473,322 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Javascript object expected error

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
9 4209
"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

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

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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Erik-Jan Bakker | last post by:
Hello, I am stuck with a weird javascript problem.... ;-( Maybe it's somehting very simple, but I am really stuck in it, right now. What's the matter.... When place my website at a different...
53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
8
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
4
by: Greg | last post by:
I'm guessing the problem I'm having has something to do with Master Pages or DetailsView because the exact same code works fine on a page without a Master Page and DetailsView controls. The...
6
by: MayBoy | last post by:
Hi There I am trying to use the Goto method of the Word ActiveX object. I am trying to open a document and go to a named bookmark. If I use this code in VB it works, so I'm sure the approach is...
60
by: marss | last post by:
Maybe anyone know good free online JavaScript knowledge test? This not exactly a system for testing online required - it may be simply list of questions with variants of answers (I have to prepare...
1
by: tgorton | last post by:
I am having a problem running a javascript function as part of an html-el:form onsubmit. The problem seems to exists in IE6 but not in Firefox. html: <html-el:form action="${target}"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.