Request.HTML

Sends HTML code to backend updates target div and executes <script>

by Cindy Cullen

HTML

<table>
  <tr class="tablerows">
    <td><div class="orderIdBtn info" id="222">
      <p>
      <div id="target">
      data
      </div>
      </p>
    </div> </td>
  </tr>
</table>

CSS

body {
    font-family: Helvetica, Sans, Arial;
}
p {
    padding: 10px;
}

JavaScript

new Request.HTML({
    url: '/echo/html/',
    data: {
        html: "<p>Text echoed back to request</p>" + "<script type='text/javascript'>$('target').highlight();<\/script>",
        delay: 3
    },
    method: 'post',
    update: 'target'
}).send();