hi everybody,
tried the framework and build a little SQL Update, triggered by a JS
function:
<a href="javascript:updateData()"><img
src="../images/thumbs/thumb_blue.png" border="0" /></a>
<div id="yeah">
<?php foreach ($movies as $item => $value) { ?>
<?= $value['title'] ?>
<?= $value['playing'] ?>
<?php } ?>
</div>
<script type="text/javascript">
function updateData() {
var options = {
method : 'post',
postBody : 'id=1&value=44'
};
new Ajax.Request('update.php', options);
}
</script>
SQL Update is working (value changes from whatever to 44 in the
database). But the value in the DIV is not refreshing. I think I don't
know how to handle the Updater...
new Ajax.Updater('yeah', 'test.php', {asynchronous:true});
That's the way I have it now, but don't know
- where to put it ?
- whether I inserted the right URL (test.php is the DIV's page) ?
- whether I have to say new Ajax.Updater or just Ajax.Updater ?
I hope you can help me - the mini manual on scriptaculo.us says nothing
about it...
Thx, Marc