a value from a JavaScript to a JavaServlet parameter?
For example, I have:
rs = stmt.executeQuery("SELECT unique releaseno from
scars.tc_releases where status='active'");
out.print("<td>");
out.print("<select name=release size=1 onclick= Sel_Rel()>");
out.print("<option value= " +">" +"select a release");
while(rs.next()){
int a = 0;
int b = 0;
int c = 0;
int d = 0;
releaseno[a] = rs.getString("releaseno");
//sabbr[b] = rs.getString("sabbr");
//status[c] = rs.getString("status");
//pcabbr_release[d] = rs.getString("pcabbr");
out.print("<option value= " +releaseno[a]+">" +releaseno[a]);
}//end rs.next
out.print("</select>");
out.print("<script type=\"text/javascript\"
language="JavaScrip\">");
out.print("function Sel_Rel(s) { ");
out.print("userInput = new String();");
out.print("userInput = s.options[s.selectedIndex].value;");
out.print("}");
out.print("</script>");
Note that userInput will contain a selected value, but how do I pass this
value to a servlet parameter to do
something with userInput inside a servlet? Any help is appreciated!!
Thank you.
Tyla
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html