Please can someone help me fix this so if the user clicks cancel to the prompt the form will not submit?
Kindest thanksm
Steven Hawkz
<script LANGUAGE="JavaScript">
function ConfirmClose(j,id) {
if (document.form1["fix" + j].checked = true) {
if (confirm("Are you sure you want to Fix this?")) {
var Name = if(window.prompt("Please enter your Name")) {
form1.action = "fix.asp?id="+[id]+"&Name="+Name;
form1.submit();
return true;
} else {
return false;
}
} else {
document.form1["fix" + j].checked = false
return false;
}
}
else
{
}
}
</script>
Kindest thanksm
Steven Hawkz
<script LANGUAGE="JavaScript">
function ConfirmClose(j,id) {
if (document.form1["fix" + j].checked = true) {
if (confirm("Are you sure you want to Fix this?")) {
var Name = if(window.prompt("Please enter your Name")) {
form1.action = "fix.asp?id="+[id]+"&Name="+Name;
form1.submit();
return true;
} else {
return false;
}
} else {
document.form1["fix" + j].checked = false
return false;
}
}
else
{
}
}
</script>