Ajax and IE6 - is there some sort of "trick"?

Hi,
I’ve got some Ajax stuff that shows more or less of a complex form based
on a radio button selection. A “radio_handler” controller action is the
action for a form handler. Some seemingly simple “replace_html” fires
as a result of different radio buttons being chosen (which should then
show more or less of the form).

This all works just great on Mac Safari and Mac Firefox.

On Windows IE6, the rendering just doesn’t happen. No errors in the
log, just the replace_html rendering just doesn’t change what’s showing
on the screen.

Anybody seen something like this in IE and have a solution?

thanks,
jp

Jeff P. wrote:

A “radio_handler” controller action is the
action for a form handler.

correction…
A “radio_handler” action is the action for an “observe_form” observer.

thanks,
jp

Jeff,

I was doing exactly the same thing that you are doing a while back
(radio buttons showing/hiding form elements) and I ran into the same
problem. I wrote the following note to myself about the problem:

The javascript generated by observe_field does not work as expected with (at least) IE 6.0. It exhibits the confusing behavior of sending an XHR with value set to an empty string.

Its something to do with the way IE’s non-standard event model deals
with radio buttons. I can’t tell you what exactly what the issue is,
my solution to this problem was to use remote_function(), like so:

This is better than observe_form anyway, it’s event driven rather than
the client polling the server. After thinking about it I really dont
see any use for observe_form or observe_field at all . . it seems to
me that there is always an equivalent event-driven way to do it like
the one above. Anybody disagree?

Happy coding!
Blake M.

On Mar 6, 7:22 pm, Jeff P. [email protected]

This is better than observe_form anyway, it’s event driven rather than
the client polling the server. After thinking about it I really dont
see any use for observe_form or observe_field at all . . it seems to
me that there is always an equivalent event-driven way to do it like
the one above. Anybody disagree?

I may be wrong, but i would say if you don’t pass a frequency parameter
to observe_field (never used it with observe_form, so no idea) it
defaults to event-driven behaviour. It will periodically poll only if
you explicitily ask for it.

regards,

javier ramirez

Estamos de estreno… si necesitas llevar el control de tus gastos
visita http://www.gastosgem.com !!Es gratis!!

Blake M. wrote:

Jeff,

Happy coding!
Blake M.

Thanks very much Blake. I agree with you on observe form. I’ve wound
up taking them out and replacing them with event driven approach in
other places before. I guess maybe I’ll just avoid them completely now.
On the surface it seems like the easy way to watch three separate items
with one thing…but there are always problems with it. And the extra
server churning pretty much puts the first nail in its coffin.

cheers,
jp