SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Jun 2006
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AJAX response problem

    Hi Folks,

    I'm using BBC's glow to make an ajax post, its works fine, but I'm having trouble displaying the results, if I use:

    glow.dom.get('#alert').text(response.text());

    It displays the results in a div with all the html escaped.

    Does anyone know how I can display the results as html?

    Many thanks

    Code:
    <div id="alert">
    
    &lt;table width="100%" border="0" cellspacing="5" cellpadding="5"&gt;
      &lt;tr&gt;
        &lt;td&gt;Name&lt;/td&gt;
        &lt;td&gt;Lead&lt;/td&gt;
      &lt;/tr&gt;
    
      &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
    
        &lt;td&gt;ABDUL KADIR&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Abigail Clinton&lt;/td&gt;
    
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Adrienne Parker&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
    
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Aileen Makohon&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
    
      &lt;tr&gt;
        &lt;td&gt;Aimee Garbett&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
    
        &lt;td&gt;Alison Boughey&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Alison Durman&lt;/td&gt;
    
        &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Alison Hodgson&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
    
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Amy Harrison&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
    
      &lt;tr&gt;
        &lt;td&gt;Matthew Harris&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
    
        &lt;td&gt;Clare Neill&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Lynne Thompson&lt;/td&gt;
    
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Clare Neill&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
    
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Amanda Harris&lt;/td&gt;
        &lt;td&gt;0&lt;/td&gt;
      &lt;/tr&gt;
    
      &lt;tr&gt;
        &lt;td&gt;Amanda Harris&lt;/td&gt;
        &lt;td&gt;0&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
    
        &lt;td&gt;Amanda Harris&lt;/td&gt;
        &lt;td&gt;0&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Amanda Harris&lt;/td&gt;
    
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Amanda Harris&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
    
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Matthew Harris&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
    
      &lt;tr&gt;
        &lt;td&gt;Matthew Harris&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
    
        &lt;td&gt;Matthew Harris&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Matthew Harris&lt;/td&gt;
    
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Matthew Harris&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
    
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Matthew Harris&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
    
      &lt;tr&gt;
        &lt;td&gt;Matthew Harris&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
    
        &lt;td&gt;Matthew Harris&lt;/td&gt;
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Matthew Harris&lt;/td&gt;
    
        &lt;td&gt;1&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Amanda Harris&lt;/td&gt;
        &lt;td&gt;0&lt;/td&gt;
    
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Amy Harrison&lt;/td&gt;
        &lt;td&gt;0&lt;/td&gt;
      &lt;/tr&gt;
    
      &lt;tr&gt;
        &lt;td&gt;Amanda Harris&lt;/td&gt;
        &lt;td&gt;0&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
    
        &lt;td&gt;Amanda Harris&lt;/td&gt;
        &lt;td&gt;0&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt; </div>

  2. #2
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Try glow.dom.get('#alert').html(response.text());

    That ought to do the trick. (See the documentation for more help)

    Html(): http://www.bbc.co.uk/glow/docs/1.7/a...ml#method:html
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •