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:55
Object Required Error
Poster: dbaguy
Dated: Friday November 21 2003 - 20:14:26 GMT
Hi, great menu! I am receiving a small problem though when users come in through a link other than the menu. When this happens, they receive an error (at http://www.sqlservercentral.com):
Line 16
Object Required
Any ideas? My code looks like this:
<head>
<!--Start menu jscript-->
<SCRIPT language=JavaScript src="/include/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/include/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/include/mmenudom.js><\/scr"+"ipt>");
</script>
</head>
<!--Inside the table-->
<SCRIPT language=JavaScript src="/include/menu_data.js" type=text/javascript></SCRIPT>
<!--end menu jscript-->
<!--Start left menu jscript-->
<script>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=155;
left=200;
alwaysvisible=1;
orientation="vertical";
overfilter="";
position="relative";
aI("text=Home;url=http://www.sqlservercentral.com/;status=Back To Home Page;");
aI("text=Resources;showmenu=Resources;");
aI("text=Articles;showmenu=Articles;");
aI("text=About Us;showmenu=About Us;");
aI("text=My Account;showmenu=My Account;");
aI("text=Search;url=http://www.sqlservercentral.com/siteSearch/search.asp;status=Search;");
}
drawMenus();
</script>
<!--end menu jscript-->
Poster: John
Dated: Friday November 21 2003 - 20:39:59 GMT
I am quite confused by...
dbaguy wrote:
I am receiving a small problem though when users come in through a link other than the menu.
What, exactly, do you mean, and what is the error they get?
Also, a few minor things...
You didn't close the <td> that has the Main Menu script in it (that actually might not be so minor depending on the browser).
A little below the script you have   , rather than .
Poster: dbaguy
Dated: Friday November 21 2003 - 20:57:20 GMT
Seeing it as an Error alert popup. I have Visual Studio installed and when I choose
debug it points to
_h=_gm.offsetHeight
in the last (really long unwrapped line) in mmenudom.js
Fixed the lack of </TD> issue. It also appears to only be appearing in the registered version. I have downloaded it prior to this and the demo version didn't have this issue.
Poster: dbaguy
Dated: Friday November 21 2003 - 21:00:01 GMT
Also, scratch the comment "I am receiving a small problem though when users come in through a link other than the menu.". It seems to be happening anytime. WHen I refresh, it goes away for that one page and session.
Poster: dbaguy
Dated: Friday November 21 2003 - 21:04:00 GMT
Sorry, I loaded the demo version back up again and still having the problem. That clue was a false-positive.
Poster: dbaguy
Dated: Friday November 21 2003 - 21:14:11 GMT
I think I have it fixed! It seems like this statement was a requirement and it would throw the error otherwise.
<div style="position:absolute;visibility:hidden">
/*
Milonic DHTML Website Navigation Menu Version 5.0
Written by Andy Woolley - Copyright 2003 (c) Milonic Solutions Limited. All Rights Reserved.
Please visit http://www.milonic.com/ for more information.
Although this software may have been freely downloaded, you must obtain a license before using it in any production environment.
The free use of this menu is only available for Non-Profit, Educational & Personal Web Sites who have obtained a license to use.
Free, Commercial and Corporate Licenses are available from our website.
You also need to include a link back to http://www.milonic.com/ if you use the free license.
All Copyright notices MUST remain in place at ALL times.
This includes the first three lines of this notice on every page that uses the menu.
If you cannot comply with all of the above requirements, please contact us to arrange license waiver.
*/
</div>
Poster: John
Dated: Friday November 21 2003 - 23:15:32 GMT
The <div> is not a requirement, but...
Quote:
All Copyright notices MUST remain in place at ALL times.
Not too much to ask.
Poster: Maz
Dated: Friday November 21 2003 - 23:38:38 GMT
Did you try placing in the body instead of the head?
It looks like html, if it was xhtml then use CDATA, I put a copy of it in the bug section.
Also the script should go in body.
If that doesn't work, there is another post of a table where she put the submenu before the menu. Not sure what thats about, but your submenus are going under a layer.
Regards,
maz