Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:12

line 17, char 1763, object expected


Poster: pat __at__ dracoblu.com
Dated: Tuesday September 16 2003 - 0:16:26 BST

I have downloaded the latest candidate 10, and the menu does not load when the page first appears. Upon refresh I am getting the following error:

line 17, char 1763, object expected

Any help would be appreciated ASAP - I am without a menu and copied over my candidate 9 file.

http://www.dracoblul.com

Thanks, Pat


Poster: Hergio
Dated: Tuesday September 16 2003 - 4:45:18 BST

Your link was bad, but I figured out its http://www.dracoblu.com

Your problem: you are missing a double quotes in your second script reference around the word javascript. I can't stress enough to just copy and paste the code from the install doc, the quotes won't hurt the page if they are missing. See your code below and notice the missing ending double quote.
<script language="javascript" src="milonic_src.js" type="text/javascript"></script>
<script language="javascript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script language="javascript" src="menu_data.js" type="text/javascript"></script>


Poster: pat __at__ dracoblu.com
Dated: Tuesday September 16 2003 - 5:14:33 BST

Thanks so much....Sorry for the inconvenience.


Poster: Hergio
Dated: Tuesday September 16 2003 - 12:40:43 BST

no inconvenience, I was just in one of those moods late last night, real tired, ya know? It always helps to have a fresh pair of eyes look over one's code because you can miss the smallest of things, trust me, I know first hand. Countless sleepless nights coding has shown me to rely heavily on others proofing my syntax once in a while. ;)


Poster: John
Dated: Tuesday September 16 2003 - 14:57:02 BST

Hergio wrote:
...the quotes won't hurt the page if they are missing.

Actually, some of the "upper level" HTML versions (XHTML, XML, etc.) are getting finicky about that. Things like border=0, type=text/javascript, etc., (note no quotes) are going to fail the checkers as folks try to move up the ladder. Everything now needs quotes.


Poster: pat __at__ dracoblu.com
Dated: Tuesday September 16 2003 - 15:27:13 BST

You are correct, John. The script as it stands now is not W3C XHTML compliant. Apart from the quotes, the "<scr" is being misunderstood as an attribute. I have advised Andy.

Pat


Poster: John
Dated: Tuesday September 16 2003 - 15:35:09 BST

pat __at__ dracoblu.com wrote:
You are correct, John. The script as it stands now is not W3C XHTML compliant. Apart from the quotes, the "<scr" is being misunderstood as an attribute. I have advised Andy.

Good catch, Pat. I think this is the problem. Now it is...
Code:
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");

Don't we need to quote the other attributes?


Poster: pat __at__ dracoblu.com
Dated: Tuesday September 16 2003 - 15:43:55 BST

I think the best solution is to call the .js from a separate file and take it out of the HTML document altogether. This is what I have done for now until I hear from Andy (see http://www.dracoblu.com). As you mentioned, even calling a .js file has to follow strict guidelines to include quotes and specification of file type like the following:

<script language="javascript" src="milonic_src.js" type="text/javascript"></script>


Poster: John
Dated: Tuesday September 16 2003 - 15:49:40 BST

I use include and cfinclude for mine (as I'm getting them re-written). Lots easier in many ways.