User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,592 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,529 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 494 | Replies: 3
Reply
Join Date: May 2005
Posts: 229
Reputation: nathanpacker is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
nathanpacker's Avatar
nathanpacker nathanpacker is offline Offline
Posting Whiz in Training

Dynamically updating values in a form as you type?

  #1  
Nov 3rd, 2007
Hey, not sure if this is possible with PHP, but I thought I'd ask anyway. Is it possible to update values on an html page based on values being typed into an input box? For example. My table has three columns. Column 1 has an integer in it. Column two is a blank text input box. I would like column three to dynamically show the total of column 1 plus column 2. So whatever number you put in the box in column 2 would be automatically added to the number in column one, and show the total in column 3, without hitting a button or anything. Is this possible with html and php? If not, what would be the language best suited to accomplish this?

Thanks,
Nate

EDIT: Again, I search and search and search, and not until I post a question on the forum, do I find the answer. If you know of a way to do it with PHP, great, please share, but I thought I would share an example I found that will work great, using Javascript. See the example I found here. Just view the source to see the easy way they did it.
Last edited by nathanpacker : Nov 3rd, 2007 at 9:58 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2006
Posts: 32
Reputation: StatiX is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 2
StatiX's Avatar
StatiX StatiX is offline Offline
Light Poster

Re: Dynamically updating values in a form as you type?

  #2  
Nov 3rd, 2007
Just by using php and html it wouldn't be possible. However it would be possible using ajax and making calls back to the php script to get data. I'm not sure exactly how it works but thats the only way I can think of unless you use javascript like in your example.
Always do what you wish you could..
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 252
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 14
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: Dynamically updating values in a form as you type?

  #3  
Nov 4th, 2007
crap
Do a favour, leave me alone
Reply With Quote  
Join Date: Aug 2007
Location: Cavite,Philippines
Posts: 508
Reputation: ryan_vietnow is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 68
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: Dynamically updating values in a form as you type?

  #4  
Nov 4th, 2007
javascript is the simplest and easiest way.However,if you want to harden yourself,use AJAX.
"death is the cure of all diseases..."
http://ryantetek.wordpress.com
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 6:44 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC