J
john
I am using Morten's JavaScript Tree Menu http://www.treemenu.com and i need
to be able to put a node into the tree which is called
'second level -23'
which comes from a database
The code goes like so
var second_level_-23 = null;
second_level_-23 = new MTMenu();
second_level_-23.addItem('second level - 23'..........
I need to do something to the - in the middle of the string. Can anyone
tell me how to convert 'second level -23' to a legal name for a javascript
var. I am building the tree dynamically so need to write the replacement
string in VB to pass to the completed script.
Many thanks
John
to be able to put a node into the tree which is called
'second level -23'
which comes from a database
The code goes like so
var second_level_-23 = null;
second_level_-23 = new MTMenu();
second_level_-23.addItem('second level - 23'..........
I need to do something to the - in the middle of the string. Can anyone
tell me how to convert 'second level -23' to a legal name for a javascript
var. I am building the tree dynamically so need to write the replacement
string in VB to pass to the completed script.
Many thanks
John