Posted By

jlvallelonga on 02/17/09


Tagged

div ajax javascript display html


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

enajenkins


Display HTML


 / Published in: JavaScript
 

this function displays the given page with the given query string in the given div usage: <a href="javascript:>View All Categories

use this function with the getHTTPObject() function

  1. var http = getHTTPObject();
  2.  
  3. function displayHTML(page, queryStr, divID) {
  4. var targ = page + "?" + queryStr + "&ms=" + new Date().getTime();
  5. http.open('GET',targ,false);
  6. http.send(null);
  7. var strHTML = http.responseText;
  8. document.getElementById(divID).innerHTML = strHTML;
  9. }

Report this snippet  

You need to login to post a comment.