Re: getting parameter value of radio button

Nandish A <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <01C2F48E.1A705CE0@NANDISH>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body>

<form method="POST" action="hi.jsp">
  <!--webbot bot="SaveResults"
  U-File="C:\WINDOWS\DESKTOP\Browser\_private\form_results.txt"
  S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
  <p><input type="radio" value="V1" name="R1"><input type="radio" value="V2" name="R1"><input type="radio" value="V3" name="R1"><input type="radio" value="V4" name="R1"><input type="radio" value="V5" name="R1"><input type="radio" value="V6" name="R1"><input type="radio" value="V7" name="R1"><input type="radio" value="V8" name="R1"><input type="radio" value="V9" name="R1"><input type="radio" value="V10" name="R1"><input type="radio" value="V11" name="R1"><input type="radio" value="V12" name="R1"><input type="radio" value="V13" name="R1"><input type="radio" value="V14" name="R1"><input type="radio" value="V15" name="R1"><input type="radio" value="V16" name="R1"><input type="radio" value="V17" checked name="R1">
<input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

</body>

</html>



<%@page contentType="text/html"%>
<html>
<head><title>JSP Page</title></head>
<body>
<%String aaa = request.getParameter("R1");
out.print(aaa);%>
</body>
</html>

hope this solves you problem, sorry i told you about the loop(its not required)
have same name values different

Good luck
Nand
-----Original Message-----
From:   Roberto Vallorani [SMTP:[email protected]]
Sent:   Thursday, March 27, 2003 5:37 PM
To:     [email protected]
Subject:        getting parameter value of radio button

I premise that i caanot use Javascrip!
I have on a web page a list of radio button whose values must be the name that i write down close to the button; I want, through a servlet, get the value of the selected button!
Does anybody know how to do?
thanks
        Roberto

___________________________________________________________________________
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

___________________________________________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.