Try
$(document).ready(function(){

      $.ajax({
            type: "GET",
            url: "letters.php",
            dataType: "html",
            error: function(){
              alert('Error loading XML document');
          },
          success: function(data){
                $('#my_div').html(data);
      }
      });
 });

where you have "<div id='my_div'></div>" somewhere in you html.





 
-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of vj
Sent: Friday, March 28, 2008 1:55 PM
To: jQuery (English)
Subject: [jQuery] jQuery - GET results


I am wondering if anyone here can help me with after retrieving my
results via ajax using jQuery how to print them in say a DIV tag  and
print them all out, I have this so far:


$(document).ready(function(){

      $.ajax({
            type: "GET",
            url: "letters.php",
            dataType: "html",
            error: function(){
              alert('Error loading XML document');
          },
          success: function(data){
                alert("Data Loaded: " + data);
      }
      });
 });

That works fine, it prints all of my HTML out in my alert that I have
in, but I want them on the screen. Any ideas?

Reply via email to