Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • thanks. how do I insert req.responseText into <div id="holder">? Commented Nov 6, 2010 at 9:24
  • @rana: document.getElementById('holder').innerHTML = req.responseText Commented Nov 6, 2010 at 9:38
  • also for error handling I can just add an else to that if statement right? Commented Nov 6, 2010 at 9:46
  • PHP errors will come across as responseText so you can see them directly. HTTP errors (e.g. 404 "can't find page") will be seen in req.status. A status of 200 indicates everything went OK with your HTTP request. Commented Nov 7, 2010 at 0:24
  • is this solution cross browser compatible? if not @steve can you modify it Commented Sep 21, 2011 at 2:08