2 Replies Latest reply on Dec 15, 2012 2:59 AM by BKBK

    retrieving Ajax callback

    Cormorand

      I just wrote my first Ajax code, and am looking for a more elegant way to retrieve the callback from the ColdFusion server page.  My callback page returns this data:  <html><body><div>6</div></body></html>  Right now I am using this Javascript to retrieve the 6 from inside the div:  (data = string sent by server page) var divloc = data.indexOf('div'); var callback = data.substr(divloc+4,1);  Is there a better way to retrieve the 6 from those HTML tags, or could I get the server page to pass just the 6, without the HTML, back to the calling page?