onFailure fails?
- From: Douglas Livingstone <rampant (at) gmail.com>
- Date: Tue, 14 Feb 2006 17:50:06 +0000
2006/2/14, Martin Ström <mlists (at) burnfield.com>:
> There's a on404 event you could catch:
>
> new Ajax.Request('non_existant.file', {
> onSuccess: function(){alert("yay");},
> on404: function(){alert("404")}
> })
>
>
Aah, thanks, that's the trick. onFailure only gets called with a
remote request. It means I can't test this stuff locally without
setting up a server... WebRICK here I come...
Cheers,
Douglas
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs (at) lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs