Saturday, May 11, 2024
 Popular · Latest · Hot · Upcoming
93
rated 0 times [  98] [ 5]  / answers: 1 / hits: 26202  / 16 Years ago, tue, february 10, 2009, 12:00:00
for (i = 0; i < document.checks.user.length; i++) //for all check boxes
{
if (document.checks.user[i].checked == true )
{
document.checks.submit();
return 0;
}
}

<body>
<form action= method=POST name=checks ID=Form2>
I have a bike:
<input type=checkbox name=user value=Bike ID=Checkbox1>
<br>
<br>
</form>
<input type=button value=Delete
class=btn onclick=sub_delete()
onmouseover=hov(this, 'btn btnhov') onmouseout=hov(this, 'btn')
id=Button1 name=Button1
/>
</body>


as you probably already know when there is only one check box left document.checks.user.length = undefined. Whats the most efficient way to make sure that when there is only one check box, it will be deleted. I was thinking just thinking to add it as a seperate if statement before the if statement here.....any suggesstions.



Thanks.


More From » html

 Answers
There are no answers for this question yet.
Only authorized users can answer the question. Please sign in first, or register a free account.
jacquezf

Total Points: 27
Total Questions: 109
Total Answers: 98

Location: Lesotho
Member since Wed, Jun 2, 2021
3 Years ago
jacquezf questions
Fri, Apr 8, 22, 00:00, 2 Years ago
Mon, Jan 10, 22, 00:00, 2 Years ago
Thu, Oct 29, 20, 00:00, 4 Years ago
Sun, May 31, 20, 00:00, 4 Years ago
;