How can I, on button click, to select ONLY the following 4 checkbox?
I would like to do this without a for loop through form.lenght because
this is only an example and I have to apply this script on a 10k+ lines
page and IE, looping through a form with 20k+ elements is VERY SLOW.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento senza titolo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" method="post" action="">
<input type="button" name="Submit" value="Select"
onclick="sel(next_four_elements);">
<input type="checkbox" name="1">
<input type="checkbox" name="2">
<input type="checkbox" name="3">
<input type="checkbox" name="4">
<br>
<br>
<input type="button" name="Submit" value="Select"
onclick="sel(next_four_elements);">
<input type="checkbox" name="5">
<input type="checkbox" name="6">
<input type="checkbox" name="7">
<input type="checkbox" name="8">
</form>
</body>
</html>
I was thinking about
<pseudo-code>
function sel(w){
/* select following 4 elements after you */
}
</pseudo-code>
Any help much appreciated.
Regards.
--
Fabri
(Incredibile come si tenda a credere di piu` a Rossi. (cit.))