with declaring this object new Ajax.Request I will request the page /my/url
however, on the server side, how should look the files? I canno tunderstand how can I give a positive o negative feedback
Thank you and sorry for these basic question
On 6/28/06, Martin Ström <[EMAIL PROTECTED]
> wrote:
Something like this should do it:
new Ajax.Request("/my/url", {
asynchronous: true,
onSuccess: function(r) {
$("myDiv").innerHTML = "updated! new contents " + r.responseText;
},
onFailure: function(r) {
alert("failed!")
}
})
See the docs ( http://wiki.script.aculo.us/scriptaculous/show/Ajax.Request ) for more info
CiaoMartinOn 6/28/06, Il Neofita <[EMAIL PROTECTED]> wrote:Hi Andrew,
I am not so good in Java, can you send me a basic example.
Thank youOn 6/28/06, Martinez, Andrew < [EMAIL PROTECTED]> wrote:Don't use Ajax.updater. Use the regular Ajax object and then pass in your own onSuccess function handler/function pointer/functor. The handler/pointer/functor will receive the response test in a HTTP request object and you can evaluate it there.
-Andrew Martinez
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Il Neofita
Sent: Wednesday, June 28, 2006 10:49 AM
To: [email protected]
Subject: [Rails-spinoffs] Ajax.Updater
Hi,
someone can help me, I am ot able to find the way how to user Ajax.updater to test if the request give some positive or negative result.
I am able only to return the result inside a div.
An example is appreciated.
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
