I don't think that expression will work because the element variable
is undefined in that scope. Element is the class and all the fun
methods that you can use. but you must send the update function an
element to update, or alternatively use it as a member function of an
extended element.
I believe if you said Element.update("myFailureNotify",
"'<strong>Error Loading Content</strong>'"); and you have
<div id="myFailureNotify"></div> somewhere in your HTML then you may
get your desired effect. On a CSS note you would be better off
removing the <strong> markup and adding font-weight:bold; to the
ruleset of the #myFailureNotify selector.
Cheers,
Matt
On Jul 16, 4:11 pm, MMason <[EMAIL PROTECTED]> wrote:
> Is onFailure supposed to work with Ajax.Updater? I cannot get it to
> work:
>
> new Ajax.Updater(elementID, url, {
> method: 'get',
> evalScripts: true,
> onFailure: function() {
> element.update('<strong>Error Loading Content</strong>');
> }
>
> });
>
> If I use Ajax.Request it works flawlessly but if I use that I loose
> the necessary evalScripts option.
>
> Am I missing something here?
>
> Thanks,
> Mike
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---