Hi
I have an existing form which I need to mofidy - I have 2 new checkboxes which i want to validate for if they are both checked = false
I have tried fitting in this check within the existing validation below but it doesn't call it ?
the html for the checkboxes is further below also
any ideas
thanks
kim
html code
I have an existing form which I need to mofidy - I have 2 new checkboxes which i want to validate for if they are both checked = false
I have tried fitting in this check within the existing validation below but it doesn't call it ?
the html for the checkboxes is further below also
any ideas
thanks
kim
Code:
Sub showEnquiryForm(oRSCust,strErr)
Dim oRS,oRSServices, oRSReasonForCall
Response.Write "<script src=""include/validate.js"" language=JavaScript></script>" & vbLf
Response.Write "<script src=""include/adddate.js"" language=JavaScript></script>" & vbLf
Response.Write "<script language=JavaScript>" & vbLf
Response.Write "function validateEnquiry()" & vbLf
Response.Write "{" & vbLf
Response.Write " if (document.frmEnquiry.selService.value == '-1') {" & vbLf
Response.Write " alert('Please select a Service');" & vbLf
Response.Write " document.frmEnquiry.selService.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " if (document.frmEnquiry.selRFC.value == '-1') {" & vbLf
Response.Write " alert('Please select a Reason for Enquiry');" & vbLf
Response.Write " document.frmEnquiry.selRFC.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " if (document.frmEnquiry.selSensitivity.value == '-1') {" & vbLf
Response.Write " alert('Please select a Sensitivity');" & vbLf
Response.Write " document.frmEnquiry.selSensitivity.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " if (document.frmEnquiry.selSource.value == '-1') {" & vbLf
Response.Write " alert('Please select a Enquiry Type/Source');" & vbLf
Response.Write " document.frmEnquiry.selSource.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " if (document.frmEnquiry.txtEnquiryDetails.value == '') {" & vbLf
Response.Write " alert('Please enter some Enquiry Details');" & vbLf
Response.Write " document.frmEnquiry.txtEnquiryDetails.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " if (document.frmEnquiry.txtActionsTaken.value == '') {" & vbLf
Response.Write " alert('Please enter some Actions Taken');" & vbLf
Response.Write " document.frmEnquiry.txtActionsTaken.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " if (document.frmEnquiry.txtEnquiryDetails.value.length>2000) {" & vbLf
Response.Write " alert('Maximum of 2000 characters allowed in Enquiry Details - please edit');" & vbLf
Response.Write " document.frmEnquiry.txtEnquiryDetails.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " if (document.frmEnquiry.txtActionsTaken.value.length>2000) {" & vbLf
Response.Write " alert('Maximum of 2000 characters allowed in Actions Taken - please edit');" & vbLf
Response.Write " document.frmEnquiry.txtActionsTaken.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " if (document.frmEnquiry.txtActionsToBeTaken.value.length>2000) {" & vbLf
Response.Write " alert('Maximum of 2000 characters allowed in Actions To Be Taken - please edit');" & vbLf
Response.Write " document.frmEnquiry.txtActionsToBeTaken.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " if (document.frmEnquiry.txtPersonsContacted.value.length>500) {" & vbLf
Response.Write " alert('Maximum of 500 characters allowed in Persons Contacted - please edit');" & vbLf
Response.Write " document.frmEnquiry.txtPersonsContacted.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " if (document.frmEnquiry.chkClosed.checked == false) {" & vbLf
Response.Write " if (document.frmEnquiry.TargetDate.value=='') {" & vbLf
Response.Write " alert('Please provide a Target Date for the Enquiry');" & vbLf
Response.Write " document.frmEnquiry.TargetDate.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " else {" & vbLf
Response.Write " if (checkDate(document.frmEnquiry.TargetDate.value,new Date(),null)==false) {" & vbLf
Response.Write " document.frmEnquiry.TargetDate.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " }" & vbLf
Response.Write " }" & vbLf
Response.Write " if (document.frmEnquiry.chkClosed.checked == true &&" & vbLf
Response.Write " document.frmEnquiry.chkUrgent.checked == true) {" & vbLf
Response.Write " alert('Cannot CLOSE an URGENT Enquiry!');" & vbLf
Response.Write " document.frmEnquiry.chkUrgent.focus();" & vbLf
Response.Write " return false;" & vbLf
Response.Write " }" & vbLf
Response.Write " return true;" & vbLf
Response.Write "}" & vbLf
html code
Code:
'rh amends - custom fields for Glass
Response.Write " <tr>" & vbLf
Response.Write " <td colspan=2><span class=clsMainText>Enquiry relates to: </span><b>Missed Bin</b>"
Response.Write " <input type=checkbox " & IIf(Request("missedbin")="on","CHECKED","") & " name=chkmissedbin>" &
vbLf
Response.Write " <b>etc etc</b>" & vbLf
Response.Write " <input type=checkbox " & IIf(Request("missedbin1")="on","CHECKED","") & " name=chkmissedbin1>"
& vbLf
Response.Write " </td>" & vbLf
Response.Write " </tr>" & vbLf