Help - Search - Members - Calendar
Full Version: Object Expected Error(s)?
xFX JumpStart Public Forums > DHTML Menu Builder > Generic Problems > JavaScript Errors
galter
I recently (yesterday) upgraded to the newest ver. of DHTML Builder.  Having used it to create a toolbar and menu which remains hidden until the visibility criteria is set, I cannot get past an "object expected" error.  The error comes when I call SetupToolbar();

No matter WHERE on the page I call it, from another function, from inline script, ect.. anytime I call it I get the "object expected" error.  

Anyone have any ideas?

My visibility criteria is set as "return showClubInfoMenu == true;"  I have a function which is called when an image is moused over to set the variable showClubInfoMenu = true.  Then I call SetupToolbar(); This is the point in which the javascript error is generated.  Any help would be greatly appriciated.  Thanks in advance.
Hywel
URL?  Is your "visibility critiria" correct?  is "showClubInfoMenu" a variable or a function?
galter
you can find the page at http://www.eznetsites.com/tabu/main.html

showClubInfoMenu is a variable which is set to false to start with.

However, the showClubInfoMenu var doesn't seem to have anything to do with the "Object Expected" error.  The error is generated when the SetupToolbar() function is called.

Interestingly enough, after the error is generated, if I click ok nothing else happens.. HOWEVER.. if I resize the browser window, the menu instantly appears.   That would tell me the variable showClubInfoMenu IS being set properly.  So the question becomes why is the SetupToolbar() function failing when called directly yet NOT when the browser resize event is triggered???
galter
Well, I never did figure out why the SetupToolbar() function continued to fail.  However I found a workaround by going about my menu a different way.

BTW.. if anyone is ever looking for a quick and simple way to attach a toolbar anywhere in a page.. use the attach to object and use a hidden input object.  Name it and attach your menu to that.  Worked perfect for me.
xfx
galter,

it is VERY likely that the problem was caused by the "Code Optimization" setting. When the "Code Optimization" is set to "max" the SetupToolbar() function is renamed to f5() so you must call f5() instead...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.