Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passible var in function 1

Status
Not open for further replies.

Nebooaw

Programmer
Jun 1, 2001
142
GB
Hi, can anyone tell me what I am doing wrong?

I have multiple checkboxes called quickclose0, quickclose1, quickclose2, etc...

<script LANGUAGE="JavaScript">
function ConfirmClose(j) {

if (document.form1.quickclose[j].checked = true) {
if (confirm("Are you sure you want close off this Alert?")) {
//form1.submit();
return true;
} else {
document.form1.quickclose[j].checked = false
return false;
}
}
else {
//form1.submit();
}
}
</script>


Kind regards.
 
You said quickclose0... use:

document.form1["quickclose" + j].checked
 
Cheers, Works a treat! Your worth a star!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top