test javascript functions automatically
I want to test my javascript functions automatically before sending them to a production server.
How can I achive this?
Can you please suggest ways for me to code a program to be able to test the functions?
===
<script type="text/javascript">
<!--
function validateform() {
if (document.frm_registration.phone.value == ""){
errorMsg += "\n\tPhone number \t- Enter Phone number";
}
-->
</script>
<form action="clientregis.php" method="post" name="frm_registration" onsubmit="return validateform()"
>
<tr>
<td><div align="left">Phone number</div></td>
<td><div align="left">
<input name="phone" type="text" id="phone" size="45">
</div></td>
</tr>
<input name="cmd_submit" type="submit" value="Submit" onsubmit="return validateform()">
<input name="reset" type="reset" id="reset" value=" Clear ">
</div>
</form>
===
Thanking you in advance for your help.
|