[thelist] JavaScript syntax - ( was:Re: [CFand JavaScript])

Susan Wallace susanhw at webcastle.com
Tue Nov 5 13:56:00 CST 2002


Thanks rudy!

That makes sense! It works except at the end, the final ), does not need a
comma - if there is no other new Array line, it just needs )  I played
around with the #comma# but wasn't able to think my way through making that
work properly... so for the moment, my dummy is back, but in a new place. :)

The next issue I have is that when the CF builds the items, I get an error
with the JavaScript. I compared this output to my original script and I do
not see anything obvious about why it would not work.

Since this was getting really long, I posted the code here:
http://www.webcastle.com/tests/droptest8.html

The script that I have that functions without being dynamic is here:
http://www.webcastle.com/tests/droptest6.html

The page now loads without errors, but when I select an item in the drop
list, I get:

Line: 86
Char: 1
Error: options.0 is not an object

Which appears to be this line in the function:
selectCtrl.options[0].selected = true;

Can someone lend an eyeball and tell me what I missed in the function/form?

Thanks again!

Susan




More information about the thelist mailing list