I am trying to use google closure compiler on my javascript files. It works fine except for the following piece of code:
function goto(form) { var index=form.select.selectedIndex
if (form.select.options[index].value != "0") {
location=form.select.options[index].value;}}
The compiler returns:
JSC_PARSE_ERROR: Parse error. missing ( before function parameters. at line 1 character 9 function goto(form) { var index=form.select.selectedIndex
There is a caret (^) pointing to the g in "goto" when it is output on the screen.
I am using just the basic UI version here to test:
http://closure-compiler.appspot.com/home
Any idea what is wrong with the javacript? It seems to work just fine but I am not a javascript person so I have no clue how to fix it.
selectedIndex, doubt that is the issue.