Droplist calling scriptlet/beans

U

unlikeablePorpoise

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
 
W

Wojtek

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top