On Sun, Oct 26, 2008 at 4:20 AM, Arnar Birgisson <[EMAIL PROTECTED]> wrote:
> Have you tried...
>
>> AjaxUpdater = function (id, page) {
>> var d = doSimpleXMLHttpRequest(page);
>> d.addCallback(function (req) {
>> getElement(id).innerHTML = req.responseText;
>
> >> adding it here <<
...
If I'm not mistaken, you can't access nodes through the DOM api
immediately after assigning through innerHTML. The nodes don't exist
until the current event has ended. A simple solution is to set a
timeout of 1 millisecond and do it in there. Eg.:
AjaxUpdater = function (id, page) {
var d = doSimpleXMLHttpRequest(page);
d.addCallback(function (req) {
getElement(id).innerHTML = req.responseText;
setTimeout(
function() {
// adding it here
}, 1);
...
--
troels
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---