![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
It's an ASP intranet page, but I put up and HTML version at http://www.middletree.net/sample.html Find the listbox labeled Original Caller Name, with a checkbox near it. I have that checkbox checked when the page loads, and when it remains checked upon page submission, it should throw a javascript error if you don't select one of the names in there. The good news is, it gives you the error msg box. The bad news is, it still forwards you to the next page (which happens to be absent in my example; sorry) Thing is, I don't want it to submit; I want it to return false. That's where my question lies. Here's my JS code for that error msg(don't worry about the ExternalContactID; long story) if (frm.source.checked == true) { if (frm.InternalContactID.value == "") { alert("Please select the internal person who called with this problem."); frm.InternalContactID.focus(); return (false); } } else { if (frm.ExternalContactID.value == "SELECT") { alert("Please select the person who called with this problem."); frm.ExternalContactID.focus(); return (false); } |
![]() |
| Thread Tools | |
| Display Modes | |
| |