The response of the server can contain PlainAjax code, if that response is inserted into the HTML page, it will be executed by a trigger the same way. This makes it easy to create an in-place editor widget.
<script type="text/javascript">
plainajax.request('respurl: editor.php; resultloc: editor;');
</script>
<div id="editor">
</div>
{stored text from db} .' | <a
onclick="plainajax.request(\'respurl: editor.php?mode=edit; resultloc: editor;\')">
Edit text
</a>';
<div id="inputtext">
<input type="text" name="text" value="{stored text in db}" size="30" />
<a onclick="plainajax.request(\'respurl: editor.php; resultloc: editor; paramloc: inputtext;\')">
Submit changes
</a>
</div>
Note:
Check another example on how to