m@m
07-25-2011, 10:13 AM
I use this javascript validation in my form..
http://www.tizag.com/javascriptT/javascriptform.php
but without validation values go to database.. Can anyone guide me how to solve this?
First i import javascript file like this..
<script type="text/javascript" src="validate.js"></script>
Part of the My code goes like this....
<form action="Process_reg.php" method="post" name="reg" id="reg" onsubmit="return formValidator()">
<div id="accordion" style="width:400px; height:500px; font-size:12px;
font-family:Arial, Helvetica, sans-serif">
<h3><a href="#">General Details</a></h3>
<div>
<table cellpadding="5px" cellspacing="5px">
<tr>
<td>First name</td>
<td><input type="text" name="fname" id="fname" size="20px" title="Must be at least 8 characters."
/></td>
</tr>
I just only try o validate email field only... email field goes like this
<tr>
<td>Email</td>
<td><input type="text" name="email" id="email" size="20px" title="Enter Valid Email Address"
/></td>
</tr>
My whole code attach here...
Click here to download (http://www.sendspace.com/file/e2sry0)
Thanks
http://www.tizag.com/javascriptT/javascriptform.php
but without validation values go to database.. Can anyone guide me how to solve this?
First i import javascript file like this..
<script type="text/javascript" src="validate.js"></script>
Part of the My code goes like this....
<form action="Process_reg.php" method="post" name="reg" id="reg" onsubmit="return formValidator()">
<div id="accordion" style="width:400px; height:500px; font-size:12px;
font-family:Arial, Helvetica, sans-serif">
<h3><a href="#">General Details</a></h3>
<div>
<table cellpadding="5px" cellspacing="5px">
<tr>
<td>First name</td>
<td><input type="text" name="fname" id="fname" size="20px" title="Must be at least 8 characters."
/></td>
</tr>
I just only try o validate email field only... email field goes like this
<tr>
<td>Email</td>
<td><input type="text" name="email" id="email" size="20px" title="Enter Valid Email Address"
/></td>
</tr>
My whole code attach here...
Click here to download (http://www.sendspace.com/file/e2sry0)
Thanks