Java Reference
In-Depth Information
<input type=”text” id=”email” />
</td>
<td>
<a href=”javascript: checkEmail()”>Check Availability</a>
</td>
</tr>
<tr>
<td class=”fieldname”>
Password:
</td>
<td>
<input type=”text” id=”password” />
</td>
<td />
</tr>
<tr>
<td class=”fieldname”>
Verify Password:
</td>
<td>
<input type=”text” id=”password2” />
</td>
<td />
</tr>
<tr>
<td colspan=”2” class=”submit”>
<input type=”submit” value=”Submit” />
</td>
<td />
</tr>
</table>
</form>
</body>
</html>
Save this fi le in your web server's root directory. If you're using IIS for your web server, save it as
c:\inetpub\wwwroot\validate_form.htm . If you're using Apache, you'll want to save it inside the
htdocs folder: pathTohtdocs\htdocs\validate_form.htm .
You also need to place httprequest.js (the HttpRequest module) and the formvalidator.php fi le
(from the code download) into the same directory as validate_form.htm.
Now open your browser and navigate to http://localhost/formvalidator.php . If everything is
working properly, you should see the text “PHP is working correctly. Congratulations!” as in
Figure 14-5.
Now point your browser to http://localhost/validate_form.htm, and you should see something
like Figure 14-6.
Search WWH ::




Custom Search