hello all,

i use a radio button to get a value
then i use java script to set the value to the parameter.

my code :

radio button:
            out.println("<input type=\"radio\" name=\"comp\"
onClick=\"onSelect('"+query.getString("ws_Computer_name")+"');\">");

the diffrent forms

           out.println("<form align=\"center\"
action=\"http://localhost:8080/servlet/za.co.epaq.license.HarddiskServlet\"
method=\"post\">");
           out.println("<input type=\"hidden\" name=\"comp\">");
           out.println("<script language=\"JavaScript\">");
           out.println("function onSelect(val) {");
           out.println("document.forms(0).comp.value = val;");
           out.println("}");
           out.println("</script>");
           out.println("<input type=\"submit\" value=\"Harddisk\">");
           out.println("</form>");

           out.println("<form align=\"center\"
action=\"http://localhost:8080/servlet/za.co.epaq.license.MemoryServlet\"
method=\"post\">");
           out.println("<input type=\"hidden\" name=\"comp\">");
           out.println("<script language=\"JavaScript\">");
           out.println("function onSelect(val) {");
           out.println("document.forms(1).comp.value = val;");
           out.println("}");
           out.println("</script>");
           out.println("<input type=\"submit\"   value=\"Memory\">");
           out.println("</form>");

           out.println("<form align=\"center\"
action=\"http://localhost:8080/servlet/za.co.epaq.license.LicenseServlet\"
method=\"post\">");
           out.println("<input type=\"hidden\" name=\"comp\">");
           out.println("<script language=\"JavaScript\">");
           out.println("function onSelect(val) {");
           out.println("document.forms(2).comp.value = val;");
           out.println("}");
           out.println("</script>");
           out.println("<input type=\"submit\"   value=\"License\">");
           out.println("</form>");


for some reason only the middle form works, the other form return nothing.
if i hide the middle form, then the last form work.
if i hide the last form, the first form work

please help,

where is my problem

Thank You
Gerrie

___________________________________________________________________________
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

Reply via email to