Menu
Hi all, I have an array of dynamically created checkboxes name Delete[]. Each one has a different number value based on an ID field from a database.
What I need to do is detect if any of these were checked and if not then raise an Alert message.
Thanks!?
[code=php]
function Validate() {
var form = document.forms[0]
var counter=0;
for (i = 0; i < form.elements.length ; i++) {
if (form.elements[i].type == "checkbox"){
If(form.elements[i].checked == "TRUE"){
counter++
}
}
}
if (counter == 0) alert("You have not selected an item to delete");
}
[/code]
[i]Originally posted by Arc [/i]
[B]I had a look at that code but I didnt really see anything that applied to what I need. [/B][/QUOTE]
I guess its beyond your comprehension..[/QUOTE]
[i]Originally posted by Khalid Ali [/i]
[B]The link uses the validation that checks for which checkboxes are checked and which are not..I guess its beyond your comprehension...and you want some one make to make the exactly code that you have work for you...
I am sure some one will have time on hand.. [/B][/QUOTE]
[i]Originally posted by Mr J [/i]
[B]Not really the right attitude is it [/B][/QUOTE]
[i]Originally posted by Arc [/i]
[B]However I wasnt aware all of that was needed to begin with...[/B][/QUOTE]
Our attitude here is for people like yourself. who think they can come here and get complete solutions. [/QUOTE]
[i]Originally posted by Khalid Ali [/i]
[B]Well applogy accepted... [/B][/QUOTE]
0.1.9 — BETA 6.3