Accessing html form values using pure Java?
Posted on 2004-11-27
Currently, I have a jsp that implements a dropdown list in html:
<form action="" method="POST" onSubmit=/*doesStuff*/) name="aForm">
<SELECT NAME="paymentTypeList" onChange="getValue()">
<OPTION value="1" selected>VISA</OPTION>
<OPTION value="3">American Express</OPTION>
The function getValue() is as follows:
globalPaymentType = document.aForm.paymentTypeList.value;
...where globalPaymentType is a global variable.
As always, any comments/examples are greatly appreciated.