943,655 Members | Top Members by Rank

Ad:
Nov 29th, 2008
0

Ajax Help

Expand Post »
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-

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. document.getElementById('outputText').innerHTML = httpObject.responseText;

My question is how can I retrieve individual fields into separate Id's?
Similar Threads
Reputation Points: 32
Solved Threads: 14
Junior Poster
tuse is offline Offline
173 posts
since Jul 2007
Nov 29th, 2008
1

Re: Ajax Help

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.
Reputation Points: 83
Solved Threads: 61
Posting Pro in Training
Luckychap is offline Offline
442 posts
since Aug 2006
Nov 29th, 2008
0

Re: Ajax Help

Thanks for your reply.

Can you please tell me how to do that?

I'm not well versed with javascript.
Reputation Points: 32
Solved Threads: 14
Junior Poster
tuse is offline Offline
173 posts
since Jul 2007
Nov 29th, 2008
0

Re: Ajax Help

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

Thanks for your help!
Reputation Points: 32
Solved Threads: 14
Junior Poster
tuse is offline Offline
173 posts
since Jul 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: OnClick/OnChange not working in IE
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: get size of image file in K , Kb and restrict uplaod if file size is above speci





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC