It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

input type="text" when filled

input type="text" when filled

Postby carcaix on Thu Sep 30, 2010 2:25 pm

I would like to know how to do that:

I have some <input type="text"> where users logged in write some numbers.
First, my idea was to make like a sample unusual dynamic calculator. When the user load the page, some queries are made and it's no matter to me to get the value of four specific fields which contain numbers.

For instance, if the logged user had:

Field1: 56 Filed2: 45 Field3: 90 Field4:0

and he fills one of the <input type="text" name="apple"> with a number, without reload the page i would like that the calculator window decreases the field1 to 40 and the field 3 to 80.

So the user could see this:

Window Calculator:
Initial: Field1: 56 Filed2: 45 Field3: 90 Field4:0
Current: Field1: 40 Filed2: 45 Field3: 80 Field4:0
1 apple

and do the same for all the <input type="text" name="fruit">
carcaix
 
Posts: 1
Joined: Thu Sep 30, 2010 2:02 pm

Re: input type="text" when filled

Postby HotNoob on Thu Sep 30, 2010 2:29 pm

use
document.getElementById

and i am sooo confused by what you are saying.
HotNoob
100+ Club
 
Posts: 169
Joined: Sun May 02, 2010 1:38 am


Who is online

Users browsing this forum: No registered users and 2 guests