On Apr 20, 5:13 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:

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

Prototype 1.6.1 and IE7.

IE7 has this neat feature that you can style checkboxes and radio
buttons like this:

    input[type=checkbox] {
       width: 40px;
       height: 40px;
    }

that give you these nice really big controls, perfect for an intranet
touchscreen kiosk scenario that we are using.  No other browser --
including IE8 -- does this.

There is, however, a Prototype extension I found that looks promising,
called Proto Check[1] that looks promising as a cross-browser way of
implementing this -- I just haven't had time to play with it yet.

[1]: http://www.bugrain.com/projects/protocheck/

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

It may have something to do with all the server-side (ASP.NET)
combined with all the JavaScript/Prototype stuff I'm doing. Ah, I
remember now -- I have an Event.Observe(window, 'load' ...)  with
every page (through a Master Page).  I read about "dom:loaded" and
tried to replace "window, 'load'" with it -- I don't think I got any
errors at *that* time, but things just didn't work quite right.  I
would love to know what the problem was/is, unfortunately the folks
here keep coming up with these inconvenient things known as
"deadlines", so I didn't get to the bottom of it and switched back...

Thanks,

-- 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 at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to