Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


SuneelKumar Machha
hai
1 Answer(s)      4 years ago
Posted in : JSP-Servlet


how to get chechbox in web page using jsp


Advertisement
View Answers

January 12, 2011 at 2:33 PM


Hi Friend,

Try the following code:

<html>
<body>
<form method="post" action="" >
Select Languages:<br>
<input type="checkbox" name="lang" value="C/C++">C/C++<br>
<input type="checkbox" name="lang" value="JAVA">Java<br>
<input type="checkbox" name="lang" value="C#">C#<br>
<input type="checkbox" name="lang" value="PERL">PERL<br>
<input type="checkbox" name="lang" value="PYTHON">PYTHON<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

<%
if(request.getParameter("lang")!=null){
String st[]=request.getParameterValues("lang");
out.println("You have selected:");
for(int i=0;i<st.length;i++){
    out.println(st[i]);
}
}
    %>

Thanks



Related Tutorials/Questions & Answers:
hai
hai   when we click on submit button request doesnot go to next servlet instead of that that servlet simply downloaded why? can tell me plz   It seems that the problem lies in your code. Anyways, we are providing you
hai
hai   I am using windows 7 with 32 bit os I installed java 1.6 version I also installed oracle 10g. When I am trying to execute jdbc-odbc programs it simply displays "jdbc drivers not found" plz help me   Java
Advertisements
hai
hai  hai this is anitha , i am persuing my B.Tech. 3rd year,i am doing a mini project,my task is to develope a code in java,to generate a graph using sql database values. so,kindly help me with my mini
hai
hai
hai
hai
hai this is sql question
hai this is sql question  what are tables in home appliances web application
hai java - Java Beginners
hai java  what do u mean by unchecked exception and checked exception? and do any java pgm will run with out thread concept... and what si thread...  Hi Friend, Please visit the following link: http
matrix addition
matrix addition  hai
matrix addition
matrix addition  hai
matrix substraction
matrix substraction  hai
matrix substraction
matrix substraction  hai
j2me exception - MobileApplications
j2me exception  Hai
matrix determination in java
matrix determination in java  hai
matrix polynamial addtion
matrix polynamial addtion  hai
jdbc
jdbc  Hai , Give a steps for jdbc connectivity
jsp webapplication
jsp webapplication  hai Good mring to all
need sourcecode - Java Beginners
need sourcecode  Hai, I need program for packetization for videos
SWING FRMES
SWING FRMES  hai SIR? HOW TO DESIGN swing Frames send source code
SWING FRMES
SWING FRMES  hai SIR? HOW TO DESIGN swing Frames send source code
query optimization
query optimization  hai ! i need a code in java for database query optimization.plz help
for loop
for loop  hai, I need to write java program to print numbers in "X" format
String tokenizer class
String tokenizer class  Hai... What is string tokenizer class? & what's its purpose
String tokenizer class
String tokenizer class  Hai... What is string tokenizer class? & what's its purpose
String tokenizer class
String tokenizer class  Hai... What is string tokenizer class? & what's its purpose
length in array
length in array  hai wat s length in array and where it s used
Interface vs abstract class
Interface vs abstract class  Hai, Is there any possible to defining abstract methods in Interface
jsp
jsp  hai please give me the table grid code code for jsp
Advertisements
 

 

 

DMCA.com