Update multiple text boxes values with one AJAX Call
I have a form which contains 1 drop down list abd 4 text boxes; the values for these boxes needs to be updated from the database based on the value from the drop down. Using the onreadystatechange you usually update the innerHTML to a div; how is it possible to update multiple values using the same method or is there other methods?
How about grabbing the response text in one variable, then splitting that variable up into bits and then putting those bits into their respective text box.
The response text would've been something like:
var someString = pageRequest.responseText;
var temp = someString.split(',');
text1.value = temp;
text2.value = temp;
text3.value = temp;
text4.value = temp;
Assuming you're using PHP you could use the implode function to add those strings together.
http://php.net/implode <-- Implode reference
By charligov in forum VB Classic
Last Post: 01-22-2007, 11:00 AM
By MacataQ in forum VB Classic
Last Post: 05-01-2005, 03:43 AM
Last Post: 08-30-2001, 11:45 AM
Last Post: 07-27-2001, 12:58 PM
By david in forum ASP.NET
Last Post: 08-02-2000, 01:42 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center