I am having a very hard time debugging this. I have a form that I
inject into the page using Ajax Updater, and submit using
Ajax.Request. If the form is successful, I want to then insert the
form content into an UL, but if it's not correct, I need to update a
different div (the one the form was initially injected into) with the
form again, showing the errors.
So what I do is submit the form to its handler using Ajax.Request,
and update the form DIV from within the onComplete function. If the
form is bad, the handler will mark the bad fields and re-display it.
But if it's good, the handler sends back a little bit of HTML to say
thanks, and a script block containing this line:
$('reflist').insert({top:'<li>stuff from form</li>'});
I have this entirely working in Firefox 2, Firebug reports no errors
at all.
In Safari 3, if I inspect the page, I can see that the correct
JavaScript is coming back, but it's apparently not firing. I've tried
all sorts of things, even very basic alerts, but they're not firing.
The code that should be firing is in a script tag, and the
Element.update documentation clearly states that any such code will
be executed when the element is updated. And in Firefox, this seems
to be the case.
I am using 1.6.0.2.
Does this ring a bell for anyone?
Thanks in advance,
Walter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---