Re: prototype.js Ajax example?

Toby Boudreaux
Mon, 25 Jul 2005 13:35:56 -0000

True, except I made a mistake in my example.
I imagine you don''t want to send a user directly to the url used for
an AJAX call. I should have written:

<a href="myurlhere" onclick="new
Ajax.Updater(''mydivhere'',
''myAJAXurlhere'', {asynchronous:true, evalScripts:true});
return
false;">Testing Ajax

For direct links, though, this.href is far better!



On Jul 25, 2005, at 9:33 AM, Steve Willer wrote:

> Even better would be:
>
> <a href="myurlhere" onclick="new
Ajax.Updater(''mydivhere'',
> this.href, {asynchronous:true, evalScripts:true}); return
> false;">Testing Ajax
>
>
>
> On 7/25/05, Toby Boudreaux
<rails-lb8SQxIZKShBDgjK7y7TUQ@public.gmane.org > wrote:
> I would recommend the following, instead. After all, requiring JS
> isn''t very WaSP-friendly or accessibility-friendly.
>
> <a href="myurlhere" onclick="new
Ajax.Updater(''mydivhere'',
> ''myurlhere'', {asynchronous:true, evalScripts:true});
return
> false;">Testing Ajax
>
> On Jul 25, 2005, at 7:48 AM, Chris Roos wrote:
>
>> <a href="#" onclick="new
Ajax.Updater(''mydivhere'', ''myurlhere'',
>> {asynchronous:true, evalScripts:true}); return false;">Testing
>> Ajax
>>
>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>



_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org