JavaScript Scripts





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
Free Java Script Codes
Javascript List All
Slide Show Slide Show
Ad Display Ad Display
Image Effect Image Effect
Animated Image Effects Animated Image Effects
Form Validation Form Validation
Color Picker Tool Color Picker Tool
Formatting Forms Formatting Forms
Select All Select All
Dynamic Form Select Dynamic Form select
Dynamic Color Dynamic Color
Calendar Script Calendar
Textbox Counter Textbox Counter
Alphanumeric Alphanumeric
Date Time Script Date & Time
Stop Watch Script Stop Watch script
Delete Repeated Values Delete Repeated Values
Pagination Pagination
Random Generator Random Generator
Animated Text Animated Text
Cursor Position Cursor Position
User Info Window / User Info
Security Security / Authenticate
Bookmark Bookmark
Mouse Effects Mouse Effects
Title Bar Title Bar
Status Bar Status Bar
Country List Country List
Free Games Free Games
Calculators Calculators
 




AutoSum Generation JavaScript


About
This javascript will help you to generate the autosum when changes made in the checkbox.


Features
a) You can generate the sum when changes made in the checkbox using javascript
b) Simple and ease of use.
c) Just copy the code into your page and use it.

Preview

Value1
Value2
Value3
Result  
©hscripts.com


Code
Javascript
<!--Script by hscripts.com-->
<!--Copywrite of HIOXINDIA-->
<!--More scripts @ http://hscripts.com-->
<script type="text/javascript"> var a=10; //set the value of first textbox. var b=20; //set the value of second textbox. var c=30; //set the value of third textbox. function app() { if(frm.chk1.checked==true) frm.txt.value=a; else frm.txt.value=0; if(frm.chk2.checked==true) frm.txt1.value=b; else frm.txt1.value=0; if(frm.chk3.checked==true) frm.txt2.value=c; else frm.txt2.value=0; var sum; if(frm.chk1.checked || frm.chk2.checked || frm.chk3.checked==true) { x=parseInt(frm.txt.value); y=parseInt(frm.txt1.value); z=parseInt(frm.txt2.value); sum=x+y+z; frm.txt3.value=sum; } else frm.txt3.value=0; } </script> <!--Script by hscripts.com-->


HTML Code
<!--Script by hscripts.com-->
<form name="frm"> <table style="border:solid green 1px">   <tr><td>Value1<input type="text" name="txt"><input type="checkbox" name="chk1" onClick="app()"></td></tr>   <tr><td>Value2<input type="text" name="txt1"><input type="checkbox" name="chk2" onClick="app()"></td></tr>   <tr><td>Value3<input type="text" name="txt2"><input type="checkbox" name="chk3" onClick="app()"></td></tr>   <tr><td>Result<input type="text" name="txt3" READONLY></td></tr>   <tr><td align=center>&copy<a href="http://www.hscripts.com" style="color:#3D366F;text-decoration:none;cursor:pointer;font-size:13px">hscripts.com</a></td></tr></table> </form>
<!--Script by hscripts.com-->

Release Date - 07-04-2008
Get free version without ©copyright link for just 5 price

For customization of this script or any script development, contact us at support@hscripts.com


Usage
a)This script is useful for generating the autosum if you click the checkbox.
b)The function app() is called to assign the value to the text box. If you click the checkbox the value will be assigned and then added. The result will be displayed in the result field.
c)To Set the values of textbox, just change the value of variables. Example: var a=10;//set value of first textbox. d)Copy the code into your page and use it.




License
- The javascript (misspelled as java script) is given under GPL License
- i.e. Free use for those who use the codes as it is.
- Free, if your modification does not remove our copyright information and links.
- Click Here for detailed license information.
- You can purchase the script if your requirements does not meet our GPL License terms.
Other Links

web hosting