title: AJAX response with undefined/object document
body: <ol>
  <li><p>My first question is I have this script that do a form exchange with my server. The server is able to read the form and send a response. When I try to print the response the below is show what I received.</p>
  
  <p>$('#myform').html(response); //there will be no response
  alert(response)//it always return me with [object Document].</p></li>
  </ol>
  
  <p>So when i change it to the below, it show what I received:</p>
  
  <pre><code>$('#myform').html(response.xml);//it will return me with the xml value from my server
  alert(response.xml)//normal xml value.
  </code></pre>
  
  <p>I can print out in eclipse web browser but not on any other browser(IE,firefox,chrome), it will return me with undefined.
  Is there something wrong I did? my server will return me with html code:</p>
  
  <pre><code>&lt;table&gt;&lt;tr&gt;&lt;img src=https://lh6.googleusercontent.com/--WAwSUUNAG8/UdOVEZvpnuI/AAAAAAAABIk/aV-NzcMN2zg/s800/g.gif&gt;&lt;/tr&gt;&lt;/table&gt;
  </code></pre>
  
  <p>2. second question is how can I print the response as html(that mean the table) instead of plaintext. </p>
  
  <p>Below is the java script code:</p>
  
  <pre><code>&lt;script&gt;
  $(function() {  
    $(".button").click(function() {  
        var clin=$("input#client").val();
                var us=$("input#username").val();
                var dataString='client='+clin+'&amp;username='+us;
        var res;
          $.ajax({  
                type: "POST",  
                url: "http://localhost:8080/services/web?wsdl/authen",  
                data: dataString, 
                success: function(response) {
                  $('#myform').html(response);
                  alert(response);
                }  
              }); 
              return false;   
    });  
  });  
  &lt;/script&gt; 
  </code></pre>
  
  <p>This is the server web service:</p>
  
  <pre><code>&lt;xs:element name="authen"&gt;
       &lt;xs:complexType&gt;
            &lt;xs:sequence&gt;
                 &lt;xs:element name="client" type="xs:string" nillable="true" minOccurs="0"/&gt;
                 &lt;xs:element name="username" type="xs:string" nillable="true" minOccurs="0"/&gt;
            &lt;/xs:sequence&gt;
       &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  
  &lt;xs:element name="authenResponse"&gt;
       &lt;xs:complexType&gt;
            &lt;xs:sequence&gt;
                 &lt;xs:element name="return" type="xs:string" nillable="true" minOccurs="0"/&gt;
           &lt;/xs:sequence&gt;
       &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  </code></pre>