[thelist] javascript problem

Scott Brady evolt at scottbrady.net
Mon Jan 6 09:28:01 CST 2003


>Am passing a value to a js function i.e. showPopupMenu(
>document.all.popupMenuDivDR03-0003 ). But on the function itself if i try
>alerting the passed value, i get "NAN". How can i get an object i.e.
>
>function showPopupMenu( oDiv )
>{
>	alert( oDiv  );
>}
>
>so as to get an object.

I believe the problem is the hyphen in the div's id. When you pass that into the function call, it's trying to subtract 3 from document.all.popupMenuDivDR03, which obviously doesn't work.

Rename your div to something else (I'm not even sure if putting a hyphen in the id will validate) and see if it works.

Scott Brady





More information about the thelist mailing list