Home     License     Free Quote     Payment     Contact Us   Tutorial    Links    Web Hosting
PHP Spam Terminator
Demo
4MemberOnly
Demo
F.A.Q
Tutorial
Commercial Licence
USZip Digger
US ZipCode Scripts
Database Snapshots
ezFAQ
Demo
Live ezFAQ
Tutorial
IPWhereRU
Excel2HTML
4MemberOnly - Template
Demo
Shopping Cart
 
How to pass values from one field to other fields using Javascript

One of the big questions people have is how they can pass values from fields to others fields.

Take a look this sample. Field C = A X B. User want to get result C automatically.

X =

Here is the code:

<script language="JavaScript">

function calculate()
{
A1 = document.catalog_form.a1.value
B1 = document.catalog_form.b1.value
C1 = (A1*B1)
document.catalog_form.c1.value = C1
}
</script>

<html>
<body>

<form name="catalog_form">
<input type="text" name="a1">
X
<input type="text" name="b1" onChange=calculate();>
=
<input type="text" name="c1" >
</form>
</body>
</html>

Copyright © 2003-2007, GDSLand.com - Great Design & Source LLC :: Refund Policy :: Privacy Policy ChemMol.com
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z