How can we GET/POST the request to server with scriptaculous.js or prototype.js.
Please explain with brief example if possible..
Regards,
Akash Jain
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You ca use
Ajax.Requestto send Ajax requests to your server (must be on the same domain name). For instance (quoting the doc) :And, for POST, replace ‘
get‘ by ‘post‘ 😉See :
Ajax.RequestNote that this can be used only to send request to a script on your own domainname, because of the Same Origin Policy implemented in web browsers for security reasons.
If you want to send requests to another domain, you’ll have to go through a proxy installed on your own (so the request seems to be sent to your domain).
Scriptaculous is an “effects” framework, to do stuff like animations, drag’n drop, and that kinf of things.
It uses Prototype, but doesn’t provide any Ajax-requesting functionnaly : it only uses those of Prototype, when necessary.