Basically i need to update some script to add some validation....
The current code checks the 'desc' field and if it blanks it brings an error message, as you can see from this code:
Code: Select all
</td></tr><tr><td> </td></tr><tr><td align=center><button class=flat2 onclick="window.onbeforeunload=null;if(document.forms[0].desc.value==''){alert('Please enter a subject');return false;} else {document.forms[0].submit();return false;}">Enter Call</button><button class=flat2 onclick="window.onbeforeunload=null;document.location='log_be.php?cancel=1&id=<? echo $nt . "&pfx=" . $_SESSION['prefix'];?>'";>Cancel Call</button></td></tr>Code: Select all
or(document.forms[0].user.value==''){alert('Please enter a user');return false;} else {document.forms[0].submit();return false;}Code: Select all
</td></tr><tr><td> </td></tr><tr><td align=center><button class=flat2 onclick="window.onbeforeunload=null;if(document.forms[0].desc.value==''){alert('Please enter a subject');return false;}or(document.forms[0].user.value==''){alert('Please enter a user');return false;} else {document.forms[0].submit();return false;} else {document.forms[0].submit();return false;}">Enter Call</button><button class=flat2 onclick="window.onbeforeunload=null;document.location='log_be.php?cancel=1&id=<? echo $nt . "&pfx=" . $_SESSION['prefix'];?>'";>Cancel Call</button></td></tr>help please..!