I would like to have an HTML dropdown list where each selection calls
a method. The following code doesn't work, but it I hope it gives the
idea of what I'm trying to do:
<FORM NAME="frm">
<SELECT NAME="sel"
onChange="document.frm.sel.options[document.frm.sel.selectedIndex].value">
<OPTION SELECTED value="">--choose--
<OPTION VALUE="<% package1.method1; %>">Call Method 1
<OPTION VALUE="<% package1.method2; %>">Call Method 2
<OPTION VALUE="<% package1.method3; %>">Call Method 3
</SELECT>
</FORM>
Basically I would like to use the JavaScript 'onChange' to invoke the
method I select from the list.
Any help would be appreciated. And if this is off-topic, let me
know :-) ...
Thanks,
Sarah
Wojtek - 20 Mar 2007 15:11 GMT
unlikeablePorpoise@gmail.com wrote :
> I would like to have an HTML dropdown list where each selection calls
> a method. The following code doesn't work, but it I hope it gives the
> idea of what I'm trying to do:
>
> onChange="document.frm.sel.options[document.frm.sel.selectedIndex].value">
> Basically I would like to use the JavaScript 'onChange' to invoke the
> method I select from the list.
You need to post tis in the JavaScript groups. This is the Java group.
Any Java objects would not be at all visible at the browser level.

Signature
Wojtek :-)