I have wrote this code
new Ajax.PeriodicalUpdater('ChatDiv', '/index/newChatMessage',{method:'get',frequency:10,asynchronous:true, evalScripts:true, insertion:function(request){return false;},parameters:'lastId='+lastChatMessageId});
My problem is that the value of parameters not change if i change lastChatMessage.
Parameters is ever set to initial value.
Is possible change it from insertion option?how?
Thanks
Why don't you try creating a variable to hold the updater, something like "var chatUpdater = new Ajax.PeriodicalUpdater(..." and then, in the script you return, append a line that looks like "chatUpdater.parameters = 'lastId='+lastChatMessageId" ?
Bookmarks