prototype.js Ajax.updater

Discussion in 'Javascript' started by Jeff, Nov 30, 2006.

  1. Jeff

    Jeff Guest

    I'd like to use Ajax.updater to update a container whose id is
    generated dynamically. Here was my first thought:

    function getEditor(id) {
    var url = '/include/helper.php';
    var prm = 'what=editor&id='+id;
    var ajx = new Ajax.Updater(id, url, { method: 'get', parameters: prm
    });
    }

    That fails. If I hardcode the container it works fine:

    function getEditor(id) {
    var url = '/include/helper.php';
    var prm = 'what=editor&id='+id;
    var ajx = new Ajax.Updater('1000', url, { method: 'get', parameters:
    prm });
    }

    This works.

    Any thoughts?
     
    Jeff, Nov 30, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. June Lee
    Replies:
    2
    Views:
    1,036
    Jim Cobban
    Apr 13, 2008
  2. Replies:
    9
    Views:
    420
    Thomas 'PointedEars' Lahn
    May 26, 2006
  3. Replies:
    1
    Views:
    242
  4. hardrock
    Replies:
    2
    Views:
    170
    hardrock
    Jun 28, 2006
  5. Replies:
    0
    Views:
    195
  6. lukemack

    prototype.js and Ajax.Updater

    lukemack, Mar 5, 2007, in forum: Javascript
    Replies:
    2
    Views:
    232
    lukemack
    Mar 5, 2007
  7. lukemack

    prototype.js and Ajax.Updater

    lukemack, Mar 5, 2007, in forum: Javascript
    Replies:
    1
    Views:
    153
    lukemack
    Mar 5, 2007
  8. Balaji

    AJAX.UPDATER + ASP.NET

    Balaji, Mar 13, 2008, in forum: Javascript
    Replies:
    2
    Views:
    146
    T.J. Crowder
    Mar 13, 2008
Loading...