Object Required Error

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
dbaguy
Beginner
Beginner
Posts: 5
Joined: Fri Nov 21, 2003 9:11 pm

Object Required Error

Post by dbaguy »

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/siteSea ... tus=Search;");
}
drawMenus();

</script>
<!--end menu jscript-->
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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 &nbsp&nbsp, rather than &nbsp;&nbsp;.
John
dbaguy
Beginner
Beginner
Posts: 5
Joined: Fri Nov 21, 2003 9:11 pm

Post by dbaguy »

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.
dbaguy
Beginner
Beginner
Posts: 5
Joined: Fri Nov 21, 2003 9:11 pm

Post by dbaguy »

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.
dbaguy
Beginner
Beginner
Posts: 5
Joined: Fri Nov 21, 2003 9:11 pm

Post by dbaguy »

Sorry, I loaded the demo version back up again and still having the problem. That clue was a false-positive.
dbaguy
Beginner
Beginner
Posts: 5
Joined: Fri Nov 21, 2003 9:11 pm

Post by dbaguy »

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://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://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>
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

The <div> is not a requirement, but...
All Copyright notices MUST remain in place at ALL times.
Not too much to ask.
John
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
Post Reply