Hi, I'm not seeing a problem. You said...
> 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: ...and your code fragment was a dom:loaded handler with just a single div, so I did a quick page using a dom:loaded handler to update four divs using your updater code (except I made the effect less subtle), and didn't have any trouble with FF, IE, Chrome... If you can post a minimalist, complete page demonstrating the problem, someone might be able to see where you're running into trouble. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 11, 6:16 pm, michaelrod77 <michaelro...@gmail.com> wrote: > 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 -~----------~----~----~----~------~----~------~--~---