Home
Tutorials
Apache Tutorials
PHP Tutorials
MySQL Tutorials
Joomla 1.5 Tutorials
Joomla 1.6 Tutorials
Joomla 1.7 Tutorials
Wordpress Tutorials
Moodle Tutorials
SEO Tutorials
SEM Tutorials
Open Office Tutorials
JavaScript Tutorials
dotProject Tutorials
VirtueMart Tutorials
PayPal Tutorials
AJAX Tutorials
Prestashop Tutorials
Forum
Index
Recent Topics
Rules
Help
Search
Tech Blog
Sitemap
Contact Us
Resources
Mentors
Downloads
Free EBooks
Free Templates
Open source training & tutorials from experienced, passionate people
Search...
Sings in these Browsers
A
-
A
A+
You are here:
Home
Forum
By A
Web Design
Index
Recent Topics
Rules
Help
Search
Welcome,
Guest
Username
Password:
Remember me
Forgot your password?
Forgot your username?
Create an account
Open Source Varsity Forum
Open Source Community
JavaScript Community
Adding values from text boxes after onchange event
(1 viewing) (1) Guest
All your queries regarding JavaScript will be solved in this forum
Reply Topic
New Topic
Page:
1
TOPIC:
Adding values from text boxes after onchange event
Adding values from text boxes after onchange event
1 year, 7 months ago
#275
avan12
OFFLINE
Junior Boarder
Posts: 35
Karma: 0
Hi,
I need some assistance with this:
I have several text boxes that stores an integer, and after each value is placed, i'd like to place the total into a separate text box.
How can I achieve this ? Can any one help ?
Thanks in advance.
Reply
Quote
Re:Adding values from text boxes after onchange event
1 year, 7 months ago
#278
sandhya
OFFLINE
Senior Boarder
Posts: 42
Karma: 0
Hi,
<html>
<head>
<s-cript type='text/j-avascript'>
function sumValues() {
var v1 = parseFloat(document.getElementById('box1').value);
var v2 = parseFloat(document.getElementById('box2').value);
document.getElementById('box3').value = v1 + v2;
}
</script>
</head>
<body>
<form on-change=sumValues()>
<input id='box1' type='text' />
<input id='box2' type='text' />
<input id='box3' type='text' />
</form>
</body>
</html>
Reply
Quote
Reply Topic
New Topic
Page:
1
Open Source Varsity Forum
Open Source Community
JavaScript Community
Board Categories
Open Source Community
- - HTML Community
- - CSS Community
- - JavaScript Community
- - Apache Community
- - PHP Community
- - MySQL Community
- - Joomla Community
- - Wordpress Community
- - SEO Community
- - SEM Community
- - OpenOffice Community
- - PL / SQL Community
- - Postgres Community
- - VirtueMart Community
- - PayPal Community
- - AJAX Community
- - Suggestion
Powered by
Kunena
Protected by Spam Fighter
Login
User Name
Password
Remember Me
Forgot your password?
Forgot your username?
Register Now!
OSV Newsletter
Receive HTML?
NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Please wait...
Home
|
Forum
|
Contact Us
|
Mentors
|
Privacy Policy
|
Disclaimer
© All rights Reserved. Crafted by
Meher Bala
and
Ivan Bayross
Valid XHTML
Valid CSS