I need help Checkbox
Hello,
I'm sorry my English is bad
I have a checkbox 5 units
Namesake all (name="uydular[]") (value="4")availability?
Checkbox_1
Checkbox_2
Checkbox_3
Checkbox_4
Checkbox_5
Rule:
Checkbox_4 with total 3 selectable
Checkbox_4 except total 2 selectable
I'm beginner
Could help?
Best Regards
Adem
I'm sorry Adem,
I'm not sure I understand the question, but I will try to help if I can.
What is it that you are trying to do with the checkboxes?
In other words, if I click checkbox 4, what happens?
CTB
Thank you for your answer
I am producing
while {
............
}
and checkbox.
The rules:
You can choose maximum 2 boxes but with choosing Checkbox_4, you can choose 3 boxes.
All of the name values are the same: name="satelite[]"
Is it possible to check by using value="4"
http://www.teklif.uzayforum.com/adim2.php
Regards
Adem
Check to see if this is what you're looking for...
Code:
<script type="text/javascript">
function checkSatelites(e)
{
var items = e.form.elements[e.name], i, j;
for (i = 0, j = 0; i < items.length; ++i) {if (String(items[i].value) !== '4' && items[i].checked) {++j;}}
return j < 3;
}
</script>
<form>
<table border="1" style="margin: 0 auto;">
<tr>
<td>Türksat 2A/3A @ 42° East</td>
<th><input type="checkbox" name="secilen_uydu_id[]" value="1" onclick="return checkSatelites(this);" /></th>
</tr>
<tr>
<td>Hot Bird 13A/13B/13C @ 13° East</td>
<th><input type="checkbox" name="secilen_uydu_id[]" value="2" onclick="return checkSatelites(this);" /></th>
</tr>
<tr>
<td>Eutelsat 7A @ 7° East</td>
<th><input type="checkbox" name="secilen_uydu_id[]" value="3" onclick="return checkSatelites(this);" /></th>
</tr>
<tr>
<td>Badr-4/5/6 @ 26° East</td>
<th><input type="checkbox" name="secilen_uydu_id[]" value="4" onclick="return checkSatelites(this);" /></th>
</tr>
<tr>
<td>Astra 1H/1KR/1L/1M/2C @ 19.2° East</td>
<th><input type="checkbox" name="secilen_uydu_id[]" value="5" onclick="return checkSatelites(this);" /></th>
</tr>
</table>
</form>
trying to, Thank you very, very much
Greetings from Turkey
Best Regards