HTML.form.guide

jQuery Form Handling

Form Validation Using Jquery Examples

When you include forms on your website for user input, it is always advisable to perform some validation on the data entered. This not only ensures that your application receives the type of data it can work with, but it also makes for good UX (user experience) as users will be able to be warned of the incorrect input and be given hints of the kind of data that is acceptable.

Continue Reading →

Loading a Drop Down List Using jQuery

To load a drop down list (or a simple list) from a database, there are different ways. One is to embed PHP code in the HTML code, that loops through the rows in the database and adds <option>` ` tags. <select name='mylist' id='mylist' size='1'> <?php while($rec = mysql_fetch_assoc($result)) { echo "<option>".$rec['name']."</option>"; } ?> </select> A better alternative is to dynamically load the list using Ajax. There are several advantages: In the earlier method, the generated HTML page can become too big making it too long to load the page.

Continue Reading →