Hi,

On Apr 20, 7:59 pm, Jelks <jelks.caban...@gmail.com> wrote:
> Wow.  Thank you and Alex so much!  I had no idea you could do that
> with document.createElement().

Cool, huh? ;-)  Most of the credit to Alex, I hadn't remembered that
until he pointed it out.

> Your solution works, and the infernal snippet is now banished to the
> hinterlands forever in all browsers.  :)

Excellent!

> > document.observe("dom:loaded", function() {
> >     $$('AsyncException').invoke('remove');});
>
> For some reason, that gives me a script error in IE (I have IE to
> always show any JS errors)

What version of Prototype and IE are you using? That's very strange.

> I changed "dom:loaded" above to "window, 'load'", and the errors went
> away.  I don't really understand the nuances between the two...

The window.load event is a standard event that happens very late in
the page load cycle, after all external resources (including images)
are loaded. The dom:loaded event is a synthetic event provided by
Prototype that happens as soon as the DOM itself is ready for
searching and manipulation, long before all images have finished
downloading. For your use case, it doesn't matter because you're
hiding the element you want to get rid of via CSS, but getting an
event as soon as possible when the DOM is ready is useful for hooking
up "unobtrusive" event handlers and such. I use "dom:loaded" on IE all
the time, it's very strange to hear of your seeing errors with it.

-- T.J. :-)

On Apr 20, 7:59 pm, Jelks <jelks.caban...@gmail.com> wrote:
> Wow.  Thank you and Alex so much!  I had no idea you could do that
> with document.createElement().  (And Alex, thanks to the link to John
> Resig's blog on this!)
>
> Your solution works, and the infernal snippet is now banished to the
> hinterlands forever in all browsers.  :)
>
> [one more comment inline below...]
>
> On Apr 20, 12:11 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
>
> > What Alex is saying that IE has the ability to let you *tell it* that
> > that's really an element.
>
> <snip />
>
> > document.observe("dom:loaded", function() {
> >     $$('AsyncException').invoke('remove');});
>
> For some reason, that gives me a script error in IE (I have IE to
> always show any JS errors) -- way down in the innards of prototype.js:
>
>   function _createResponder(element, eventName, handler) {
>     // and a few lines down is where it breaks:
>     var respondersForEvent = registry.get(eventName);
>
> I changed "dom:loaded" above to "window, 'load'", and the errors went
> away.  I don't really understand the nuances between the two (it seems
> I have run into this same issue before, but I don't remember the
> details), but any rate, it's good to go now.
>
> Thank you all once again, both for the solution and for the lucid
> explanation!  :)
>
> --
> Jelks
>
> --
> 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-scriptacul...@googlegroups.com.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
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-scriptacul...@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