hi, so i have the following:
<a onclick="validate();" href="">Delete</a>
brief overview: user selects checkboxes from table and hits delete…validate() gets the values of the checkboxes & also checks if any checkboxes have been selected at all.
function validate(form) {
var total="";
for(var i=0; i < document.form.checkedoff.length; i++){
if(document.form.checkedoff*.checked){
total +=document.form.checkedoff*.value + "
";
}
}
if(total=="")
{
alert("You must select User(s) for this operation first.")
return false;
} else {
alert (total);
return total;
}
}
what i need is to have the values of the checkboxes returned to me from validate() and then put into the href tag for php to use and delete the selected records.
kinda like this, but obviously this would not work:
<a onclick="var checked = validate();" href="delete.php?id=checked">Delete</a>
please help! thanks!!!