I have a page that calls Ajax.Updater to load external content (on the
same server) into a DIV located on that same page... pretty standard
stuff. Everything works fine when I call Ajax.Updater once. But if I
call it twice on the same page (for a second DIV), I get the error:
Cannot read property 'value' of null (line 606). Line 606 in
prototype.js is shown below.

    try {
      this._each(function(value) {
                iterator.call(context, value, index++);
      });
    } catch (e) {
          if (e != $break) throw e;    <--- line 606
    }

The exception always shows, and in every browser I've tried (IE,
Chrome, Firefox). In IE, it stops the loading of the DIV content, in
Chrome it just throws the error in the background and continues
loading just fine.

I'm guessing that this is NOT a bug, since this would creep up many
times in other people's code. But, if not, how can this be solved?

Just in case, here's how I'm calling Ajax.Updater:

  document.observe('dom:loaded', function() {
        new Ajax.Updater('divName','somepage.php',{
                evalScripts: true,
                onSuccess:function(){
                        $('divName').fade({ duration: 0.3, from: 0.6, to: 1 });
                }
        });
  }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to