0

Hi!

I am using a code to echo a row in a database table using ajax with PHP.

The code is working correctly.

The ajax will send the response text as follows-

document.getElementById('outputText').innerHTML = httpObject.responseText;

My question is how can I retrieve individual fields into separate Id's?

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by tuse
1

Simply you have to parse the server response manually.

For example you get this a client side:

responseText = "field1||fiel2||field||......";

Then using javascipt string-functions to separate all the fields and use the your method of innerHTML to populate other text fields.

Votes + Comments
good idea!
0

Thanks for your reply.

Can you please tell me how to do that?

I'm not well versed with javascript.

0

Ok, I googled a bit, I guess I can use the split() function for the purpose.

Thanks for your help!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.