I have serveral buttons.When click one of them,I want to set different value according 
the button name and send it to Servlet,for example when click the first button,I want 
to set value "001" and "Open",when click the second button,I want to set value "002" 
and "Private",and so on. Then transfer it to Servlet.I want to know how to realize it? 
My Jsp file like follows:

<html>
<title>User Menu</title>
<body>
   <form name=myform method="get" action = "/loginwebapp/servlet1">
   <%
      String message[];
      String syskubun[];
      message=(String[])request.getAttribute("jsp");
      syskubun=(String[])request.getAttribute("SysKubun");
      String SysID[]=new String[message.length];
      String Kubun[]=new String[message.length];
      for(int j=0;j<message.length;j++)
      {
         ...
         %>
               <input type="button" name=<%=message[j]%>  value="<%=message[j]%>"
               style="width:200px" onclick="javascript:goToServlet(j)">
         <%
      }
   </form>
   <script language="javascript">
   function goToServlet(int i)
   {
       //Here I want to set value,such as when i=0,I want to set the value of SysID[0] 
and Kubun[0]
       //When i=1,I want to set value of SysID[1] and Kubun[1],how to realize it?
       document.myform.submit();
   }
   </script>
</body>
</html>

Thanks very much!!!
Regard,
Edward

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to