Click here to Skip to main content
15,889,216 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Use getElementById without request to server Pin
Ali Al Omairi(Abu AlHassan)8-Apr-12 3:11
professionalAli Al Omairi(Abu AlHassan)8-Apr-12 3:11 
GeneralRe: Use getElementById without request to server Pin
Christi50008-Apr-12 6:12
Christi50008-Apr-12 6:12 
GeneralRe: Use getElementById without request to server Pin
Ali Al Omairi(Abu AlHassan)9-Apr-12 2:39
professionalAli Al Omairi(Abu AlHassan)9-Apr-12 2:39 
GeneralRe: Use getElementById without request to server Pin
Christi50009-Apr-12 5:05
Christi50009-Apr-12 5:05 
GeneralRe: Use getElementById without request to server Pin
Ali Al Omairi(Abu AlHassan)11-Apr-12 0:18
professionalAli Al Omairi(Abu AlHassan)11-Apr-12 0:18 
GeneralRe: Use getElementById without request to server Pin
RichardGrimmer11-Apr-12 5:31
RichardGrimmer11-Apr-12 5:31 
GeneralRe: Use getElementById without request to server Pin
Ali Al Omairi(Abu AlHassan)11-Apr-12 6:01
professionalAli Al Omairi(Abu AlHassan)11-Apr-12 6:01 
GeneralRe: Use getElementById without request to server Pin
RichardGrimmer11-Apr-12 21:30
RichardGrimmer11-Apr-12 21:30 
Fair enough - we all learn things we didn't know (I won't embarrass myself by pointing out the "beginners mistake" I made a few days ago!)

There are two useful fields on the response you get back from an Ajax call - responseXml (which you've already discovered), and responseText. Now if you are indeed sending Xml back, then responseXml will be correctly filled in, and responseText will contain exactly the same.

However, if in your server side code, you do a simple Response.Write("Hello World"), then IIRC responseText will contain this, responseXml will be empty (you'll need to check that last empty point - been a while!)

What this means is that you can write ANYTHING you want back and pick it up out of responseText - one neat trick I've employed in the past is to make DataGrids render as part of an ajax call, write the Html back on the response, pull it out of the responseText and slap in into a div's innerHtml property.....
C# has already designed away most of the tedium of C++.

GeneralRe: Use getElementById without request to server Pin
Ali Al Omairi(Abu AlHassan)12-Apr-12 5:19
professionalAli Al Omairi(Abu AlHassan)12-Apr-12 5:19 
AnswerRe: Use getElementById without request to server Pin
Angel13209-Apr-12 20:53
Angel13209-Apr-12 20:53 
QuestionJavascript Pin
Manikandan H4-Apr-12 21:02
Manikandan H4-Apr-12 21:02 
AnswerRe: Javascript Pin
ZurdoDev12-Apr-12 8:58
professionalZurdoDev12-Apr-12 8:58 
QuestionHow to find the row in the gridview that was selected Pin
MacIntyre4-Apr-12 13:24
MacIntyre4-Apr-12 13:24 
AnswerRe: How to find the row in the gridview that was selected Pin
Angel13209-Apr-12 20:52
Angel13209-Apr-12 20:52 
QuestionSenior Software Engineer (PayPal) Pin
jinrunping30-Mar-12 16:19
jinrunping30-Mar-12 16:19 
QuestionNewbie Question Pin
pix_programmer25-Mar-12 19:37
pix_programmer25-Mar-12 19:37 
AnswerRe: Newbie Question Pin
Dalek Dave26-Mar-12 22:34
professionalDalek Dave26-Mar-12 22:34 
GeneralRe: Newbie Question Pin
RichardGrimmer11-Apr-12 5:36
RichardGrimmer11-Apr-12 5:36 
AnswerRe: Newbie Question Pin
Richard MacCutchan27-Mar-12 22:34
mveRichard MacCutchan27-Mar-12 22:34 
GeneralRe: Newbie Question Pin
Benaiah Mischenko24-Apr-12 23:34
Benaiah Mischenko24-Apr-12 23:34 
Questionre-index array. Pin
Ethius23-Mar-12 8:40
Ethius23-Mar-12 8:40 
AnswerRe: re-index array. Pin
Jay Fesco23-Mar-12 10:33
Jay Fesco23-Mar-12 10:33 
GeneralRe: re-index array. Pin
Ethius27-Mar-12 0:58
Ethius27-Mar-12 0:58 
AnswerRe: re-index array. Pin
kingNull26-Mar-12 20:27
kingNull26-Mar-12 20:27 
QuestionHow to separate an array of checkboxes into groups Pin
SilverNightFall15-Mar-12 22:06
SilverNightFall15-Mar-12 22:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.