SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PeriodicalUpdater change parameters

    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

  2. #2
    SitePoint Addict ruby-lang's Avatar
    Join Date
    Aug 2007
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •