Hello,

In the ajax_tables example the JSON file's url is hardcoded. I tried to
adjust ajax_tables.js to allow a dynamic file but I get the following
error:

this.thead has no properties, ajax_tables.js (line 206)

What I'm doing is adding a 'url' parameter to
sortableManager.initialize and then passing the json file's url at
addLoadEvent(...);.

For example:

(original)

SortableManager.prototype = {

    "initialize": function () {
...
        this.loadFromURL("json", "domains.json");
    },
...
};

// create the global SortableManager and initialize it on page load
sortableManager = new SortableManager();
addLoadEvent(sortableManager.initialize);

(what i changed it to)

SortableManager.prototype = {

    "initialize": function (url) {
...
        this.loadFromURL("json", url); //"domains.json");
    },
...
};

// create the global SortableManager and initialize it on page load
sortableManager = new SortableManager();
addLoadEvent(sortableManager.initialize("domains.json"));


Another piece in the puzzle I guess.


Thank you for your time,
Chris.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to