I have tried this as follows.
<html:select property="job" onchange="foo();">
<html
ption value="auto">Allow auto selection of document.</html ption>
<html
ption value="manual">Manually select a document</html ption>
</html:select>
It looks like I was handling this incorrectly. Instead I believe I should access the selected value like this.
document.selectForm.batch.options[document.myForm.job.selectedIndex].value
So I could change my
test to follows
if(document.selectForm.batch.options[document.myForm.job.selectedIndex].value == "auto"){
document.write("You want to automatically select a doc.");
}else{
document.write("You want to manually select a doc.");
}
}
But then when I attempted that I get a javascript error that says
'document.myForm.job.options' is null or not an object.