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


<div id="alert">

<table width="100%" border="0" cellspacing="5" cellpadding="5">
  <tr>
    <td>Name</td>
    <td>Lead</td>
  </tr>

  <tr>
    <td></td>
    <td></td>
  </tr>
  <tr>

    <td>ABDUL KADIR</td>
    <td></td>
  </tr>
  <tr>
    <td>Abigail Clinton</td>

    <td></td>
  </tr>
  <tr>
    <td>Adrienne Parker</td>
    <td></td>

  </tr>
  <tr>
    <td>Aileen Makohon</td>
    <td></td>
  </tr>

  <tr>
    <td>Aimee Garbett</td>
    <td></td>
  </tr>
  <tr>

    <td>Alison Boughey</td>
    <td></td>
  </tr>
  <tr>
    <td>Alison Durman</td>

    <td></td>
  </tr>
  <tr>
    <td>Alison Hodgson</td>
    <td></td>

  </tr>
  <tr>
    <td>Amy Harrison</td>
    <td>1</td>
  </tr>

  <tr>
    <td>Matthew Harris</td>
    <td>1</td>
  </tr>
  <tr>

    <td>Clare Neill</td>
    <td>1</td>
  </tr>
  <tr>
    <td>Lynne Thompson</td>

    <td>1</td>
  </tr>
  <tr>
    <td>Clare Neill</td>
    <td>1</td>

  </tr>
  <tr>
    <td>Amanda Harris</td>
    <td>0</td>
  </tr>

  <tr>
    <td>Amanda Harris</td>
    <td>0</td>
  </tr>
  <tr>

    <td>Amanda Harris</td>
    <td>0</td>
  </tr>
  <tr>
    <td>Amanda Harris</td>

    <td>1</td>
  </tr>
  <tr>
    <td>Amanda Harris</td>
    <td>1</td>

  </tr>
  <tr>
    <td>Matthew Harris</td>
    <td>1</td>
  </tr>

  <tr>
    <td>Matthew Harris</td>
    <td>1</td>
  </tr>
  <tr>

    <td>Matthew Harris</td>
    <td>1</td>
  </tr>
  <tr>
    <td>Matthew Harris</td>

    <td>1</td>
  </tr>
  <tr>
    <td>Matthew Harris</td>
    <td>1</td>

  </tr>
  <tr>
    <td>Matthew Harris</td>
    <td>1</td>
  </tr>

  <tr>
    <td>Matthew Harris</td>
    <td>1</td>
  </tr>
  <tr>

    <td>Matthew Harris</td>
    <td>1</td>
  </tr>
  <tr>
    <td>Matthew Harris</td>

    <td>1</td>
  </tr>
  <tr>
    <td>Amanda Harris</td>
    <td>0</td>

  </tr>
  <tr>
    <td>Amy Harrison</td>
    <td>0</td>
  </tr>

  <tr>
    <td>Amanda Harris</td>
    <td>0</td>
  </tr>
  <tr>

    <td>Amanda Harris</td>
    <td>0</td>
  </tr>
</table> </div>



Try glow.dom.get(‘#alert’).[COLOR=“Red”]html/COLOR;

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

Html(): http://www.bbc.co.uk/glow/docs/1.7/api/glow.dom.nodelist.shtml#method:html