Hi,
I would like to know how can make my javascript works after an ajax request. This is my page :
<script src='includes/dragResize.js'></script>
<script src='includes/domdrag.js'></script>
<div id='events-loop'>
*IT KEEPS RELOADING HERE*/
</div>
<script src='includes/ajax_events_loop.js'></script>
And my Ajax file :
$query=mysql_query("QUERY");
while($result=mysql_fetch_array($query))
{
<div id='events'>The events</div>
<script type='text/javascript'>
var resize-1 = new resize();resize.init({id:'event-resize-1',direction:'y',limit:{x:[100,580],y:[50,300]}});
var dragVar-1 = document.getElementById('drag-div-1');
Drag.init(dragVar-1, dragVar-1);
</script>
}
Please note that this is not the entire page. Everything works well, Ajax is working, it keep reloading with new entries from database, but the only things that doesn't work, is the javascript. Without Ajax, with the code directly on the page, not updating, it's working well, so the code is good, but when the javascript comes from the Ajax file, its not working. I need to reload the DOM or something like that? Or to inject those new functions?
I'm looking for a solution... thank you very much !!!