View Poll Results: Is This The Best Way To Update A Large Form?
- 1. You may not vote on this poll
Ajax + Php + Update Field
I'm of coruse a n00b when it comes to ajax and I have a question about updating a record when focus is lost on a form field. Everything is written in php and mysql. I have a form with 100 fields and there is no way to shorten it. I'd like the field to "auto update" after the user has moved away from the field without having to reload the whole form.
try this code:
//this will be called after update
//this will send the data to server to be updated
xmlHttp.open("GET", 'yourupdatepage.php?'+ nameValue, true);
//retValFromPHP can be any thing you want!
<form method="post" ...>
<input type="text" name="text1" onchange="updateField(this.name + '=' + this.value);">
Last edited by mouaffak; 04-20-2007 at 09:03 PM.
By NewToAjax in forum AJAX
Last Post: 03-29-2007, 05:37 PM
Last Post: 03-22-2007, 09:15 PM
By Georgiana Trigg in forum VB Classic
Last Post: 10-29-2000, 11:21 AM
By Vincent in forum Database
Last Post: 10-05-2000, 05:35 AM
By aterren in forum VB Classic
Last Post: 09-14-2000, 04:31 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center