|
|
 |
FN-FORUM: Check box problem
date posted 18th March 2008 23:18
How do you check if a Check Box exists using Javascript before you test if
it is checked?
if (document.getElementById("ALL_Diaries") == true) {
}
doesn't work
This is my Routine
function Check_Diary_Validate(source, arguments) {
arguments.IsValid = false
if (document.getElementById("ALL_Diaries") == true) {
if (document.getElementById("ALL_Diaries").Checked == true) {
arguments.IsValid = true
}
}
if (document.getElementById("Diary_1") == true) {
if (document.getElementById("Diary_1").Checked == true) {
arguments.IsValid = true
}
}
if (document.getElementById("Diary_2") == true) {
if (document.getElementById("Diary_2").Checked == true) {
arguments.IsValid = true
}
}
if (document.getElementById("Diary_3") == true) {
if (document.getElementById("Diary_3").Checked == true) {
arguments.IsValid = true
}
}
if (document.getElementById("Diary_4") == true) {
if (document.getElementById("Diary_4").Checked == true) {
arguments.IsValid = true
}
}
if (document.getElementById("Diary_5") == true) {
if (document.getElementById("Diary_5").Checked == true) {
arguments.IsValid = true
}
}
if (document.getElementById("Diary_6") == true) {
if (document.getElementById("Diary_6").Checked == true) {
arguments.IsValid = true
}
}
if (document.getElementById("Diary_7") == true) {
if (document.getElementById("Diary_7").Checked == true) {
arguments.IsValid = true
}
}
if (document.getElementById("Diary_8") == true) {
if (document.getElementById("Diary_8").Checked == true) {
arguments.IsValid = true
}
}
if (document.getElementById("Diary_9") == true) {
if (document.getElementById("Diary_9").Checked == true) {
arguments.IsValid = true
}
}
if (document.getElementById("Diary_10") == true) {
if (document.getElementById("Diary_10").Checked == true) {
arguments.IsValid = true
}
}
}
Thanks
Pam
|
 |
|