Okay, so this is a little difficult to explain....
I'm creating a PHP-powered AJAX interface that generates a list of items. What I'm wanting to do is make that list of items sortable so I'm using the scriptaculous Sortable.create method. Here's where it gets tricky.
So my php file displays my result set using a Smarty template. The problem is that the smarty template (which contains the javascript that triggers the Sortable.create method doesn't appear to be included in the template when it's displayed, there's a blank spot in the source where the JS should be.
Here's the JS that's at the bottom of my Smarty template:
<script type="text/javascript">
{literal}
<!--
Sortable.create("results_table", {
onUpdate:function(){
alert(Sortable.sequence('results_table').join(''));
}
});
-->
{/literal}
</script>
Any ideas?