|
|
|
|
Like this code?
Show the author your appreciation.
|
|
| |
This simple script tell the way to Auto fill Html Forms...
it copy data of one field to other and also lock the data
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<script language="JavaScript">
function useBillInfo(form)
{
var idx;
{
form.ShipTo_Name_First.value= form.BillTo_Name_First.value;
form.ShipTo_Name_Last.value = form.BillTo_Name_Last.value;
form.ShipTo_Address.value = form.BillTo_Address.value;
form.ShipTo_City.value = form.BillTo_City.value;
this.form['ShipTo_Name_First'].disabled=true;
this.form['ShipTo_Name_Last'].disabled=true;
this.form['ShipTo_Address'].disabled=true;
this.form['ShipTo_City'].disabled=true;
}
}
function UNuseBillInfo(form)
{
var idx;
{
form.ShipTo_Name_First.value= '';
form.ShipTo_Name_Last.value = '';
form.ShipTo_Address.value = '';
form.ShipTo_City.value = '';
this.form['ShipTo_Name_First'].disabled=false;
this.form['ShipTo_Name_Last'].disabled=false;
this.form['ShipTo_Address'].disabled=false;
this.form['ShipTo_City'].disabled=false;
}
}
</script>
<html>
<head>
<title>Autofill Form</title>
</head>
<body bgcolor="#FFFFFF">
<form method="post" name="form">
<table>
<tr><td><font face="Verdana, Arial, Helvetica, sans-serif"><strong>Billing Information</strong></font></td></tr>
<tr>
<td>
<table>
<tr>
<td>First Name:</td>
<td><input class="inputbox" name="BillTo_Name_First" value=""></td>
</tr>
<tr>
<td>Last Name:</td>
<td><input class="inputbox" name="BillTo_Name_Last" value=""></td>
</tr>
<tr><td>Address:</td>
<td><input class="inputbox" name="BillTo_Address" value=""></td>
</tr>
<tr>
<td>City:</td>
<td><input class="inputbox" name="BillTo_City" value=""></td>
</tr>
</table>
</td>
</tr>
</table>
<div align="center"><br></div>
<table>
<tr><td><font face="Verdana, Arial, Helvetica, sans-serif"><b>Shipping Information</b></font></td></tr>
<tr>
<td>
<input type="radio" name="radiobutton" value="radiobutton" onClick="useBillInfo(this.form)">copy
<input type="radio" name="radiobutton" value="radiobutton" onClick="UNuseBillInfo(this.form)">Undo
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td>First Name:</td>
<td> <input class="inputbox" name="ShipTo_Name_First" value="" ></td>
</tr>
<tr>
<td>Last Name:</td>
<td> <input class="inputbox" name="ShipTo_Name_Last" value=""> </td>
</tr>
<tr>
<td>Address:</td>
<td> <input class="inputbox" name="ShipTo_Address" value=""></td>
</tr>
<tr>
<td>City:</td>
<td> <input class="inputbox" name="ShipTo_City" value=""> </td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html> | | |
|
| Conditional Check - a script that allows a user to submit a form only if the user check a checkbox. Categories : HTML, Java Script, Form Processing, Beginner Guides | | | Form Processing : with alert Highlight field name which is not filled by user Categories : Java Script, Form Processing, Data Validation, Beginner Guides, Web Design | | | Show hide table rows to make dynamic forms Categories : Beginner Guides, Java Script, Form Processing, HTTP | | | Changing the Style of form objects using the JavaScript OnClick method. Categories : Java Script, Form Processing, Beginner Guides, CSS | | | PHP and javascript mouseover, mouseout, and mousedown events Categories : PHP, Java Script, Form Processing, Beginner Guides | | | JavaScript dropdown list menu to switch any page. Categories : Java Script, Beginner Guides, Form Processing | | | Show or Hide your Content using Javascript Categories : Java Script, HTML, CSS, Beginner Guides | | | showing Help (assistance) to the user while filling html forms. Categories : HTML, Java Script, Form Processing | | | Form validations using javascript and including all validations in one message Categories : HTML and PHP, Java Script, Form Processing | | | Adding a Filter to a Text Element Categories : Java Script, Data Validation, Form Processing | | | How to keep your tables width stable even if you have long strings inside. Categories : CSS, Web Browsers, HTML, Beginner Guides | | | Builds JavaScript that updates the contents of one selector based on another. Categories : HTML, Java Script, PHP, Complete Programs, General | | | Db_lib - practical example usage of database abstraction and form validation.
Categories : PHP, Form Processing, PHP Classes, Data Validation, Beginner Guides | | | Validating a URL with JavaScript RegExp Categories : Java Script, Data Validation, Beginner Guides | | | Why it is not possible to preset a value in a file upload field Categories : HTML, Security, Filesystem, Beginner Guides | |
|
|
|