Help - Search - Members - Calendar
Full Version: Collapsible menu js error
xFX JumpStart Public Forums > DHTML Menu Builder > Generic Problems > JavaScript Errors
JonathanT324
I know add-ins aren't supported, but I was hoping someone else here with more javascript experience than I might know a workaround.  

I'm trying to use the expandmenu() function to automatically open a menu that I'm building witht the Collapsible Menu add-in, and I can't get it to work for menus with names that include semicolons, like "» Services" (& raquo;).If I remove the double-right arrow, it works fine.  Otherwise, I get an error that says, "'null' is null or not an object."

I'm guessing that the problem is that the semicolon is making the JS think a line of code is ending prematurely.

Any workarounds?  Or do I have to change the names?

Thanks,

Jonathan
xfx
Jonathan,

Have you tried using & raquo; instead of » when passing the caption to the ExpandMenu function?
JonathanT324
Thanks for replying so quickly.  I have tried that way and it still doesn't work.  I know that in other languages you need to write certain characters like quotation marks or semicolons a different way in the code.  I think in AppleScript you need to write quotes like: /"Hi!/" , for example, but I don't know if JavaScript has anything similar or even if that's the problem.

Thanks,

Jonathan
xfx
Jonathan,

Can you please post your .dmb project so I can run some tests?
JonathanT324
Sure, thanks for taking a look at it.
xfx
Well, guess what... I tried it using:
CODE
ExpandMenu("» Services");

And it worked... go figure!

It looks like DMB "understands" what "»" is and changes it for "»" when it compiles the project.
JonathanT324
Thanks!  That worked perfectly!
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.