Hi
I have problem in java script. Code is below.
<html>
<head><title></title>
<script language="javascript">
function check(){
var i=0;
for(i=0;i<3;i++){
document.write(document.forms[0].elements[i].value);
}
}
</script>
</head>
<body>
<form name="abc" action="">
<input type="checkbox" name="c0" value="asd">
<input type="checkbox" name="c1" value="asd1">
<input type="checkbox" name="c2" value="asd2">
<input type="button" name="b" value"click" onclick="check()">
</form>
</body>
</html>
I want to pick all the names and values of check box in a loop.
Wheather they r checked or not.
This code gives me the only first elements value and name.
Thankx in advance.
Kumail Rizvi
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets