Forums Archive Index > SmartMenus 5 > script errors
Date: 15 Feb 2005 10:01 pm
I love the menu. Thank-you for putting so much time into it. I am stuck on two script errors I can't figure out. The first is 's_[...].0' is null or not an object. The second is 'SELECTED' is null or not an object. I am using a cross frame implementation using code from your examples. Any help would be appreciated.
Date: 16 Feb 2005 1:06 am
Never mind. Found some comma's where there shouldn't have been. Hate it when that happens.
Date: 29 Mar 2005 6:57 am
I get the second one in some pages of my site, in IE, but the menu works perfectly in other pages, and on the erroneous page other browsers have no problem. The arrays are not the problem, and the implementation is identical (copy/paste from page to page).
What could be wrong?
Date: 29 Mar 2005 11:12 am
robin wrote:
I get the second one in some pages of my site, in IE, but the menu works perfectly in other pages, and on the erroneous page other browsers have no problem. The arrays are not the problem, and the implementation is identical (copy/paste from page to page).
What could be wrong?
I am almost sure this is caused by a syntax mistake you have made somewhere in your configuration file (s_arrays.js). The mistake is that you have most probably used a comma symbol after the last menu item for at least one of your menu definitions. Please check your file for something like this:
s_add(
{N:'my_menu',LV:1,T:100,L:100,P:false,S:s_CSSTop},
[
{U:'http://www.smartmenus.org/',T:'SmartMenus DHTML menu'},
{U:'http://www.smartmenus.org/',T:'SmartMenus DHTML menu'},
{U:'http://www.smartmenus.org/',T:'SmartMenus DHTML menu'},
{U:'http://www.smartmenus.org/',T:'SmartMenus DHTML menu'}, // this comma after the last menu item must not be used
]
);
Date: 29 Mar 2005 2:44 pm
ah yes, the error came from a tree with one option which still had a [,].
Now i don't get errors anymore, but i still have some conflict which makes the menu pulldowns max 3 pixels wide, in SOME pages, but not in ALL of them. I'm trying to get the script running in a phpBB forum environment:
">--> http://www.simracing.nl/uploads/images/2005_03_29_13-38-47_large.jpg
script works in the image upload page
">--> http://www.simracing.nl/uploads/images/2005_03_29_13-39-20_large.jpg
but doesn't work in the phpbb page
Date: 29 Mar 2005 3:40 pm
This happens in IE because the link to the loader script is nested in your main table. Please put this line:
<script type="text/javascript" language="JavaScript1.2" src="/menu/SNL/s_loader.js"></script>
right after the BODY tag. Or if you want, you can place it at some other place in your source but always make sure it is a direct child to the BODY tag and it is not nested in any other element's tag.
Please let me know if this doesn't solve the issue but I think it should. :)
Date: 29 Mar 2005 4:15 pm
yes it does!
hurray! :)
I'm kinda developing that site while it's evolving. Lots of users are online while i'm working on it. The template choice in your user profile defines which overall_header.tpl you're seeing, and i've been putting style-specific html-overrides in tpl code. Luckily the <body> tag is in there too, so i can fix stuff in the development style only, without crippling the other styles.
thx for your help :)