On Sat, Jul 2, 2011 at 1:07 AM, taqman filler <taqmaninw@gmail.com> wrote:
I need to send data from ajax to controllersome body help me to modified codethis ajax codeajax.jsfunction loadtooltip(obj, $user_id) {//AJAXvar req = Inint_AJAX();req.onreadystatechange = function () {if (req.readyState==4) {if (req.status==200) {displaytooltip(obj, req.responseText);}}};//���ҧ connectionreq.open("POST", "http://127.0.0.1/cakeplate/tooltips/tooltip/$user_id", true);req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");req.send($user_id); //�觤��};
try $.ajax in jqyery
$.ajax{(
type: "POST",
url: "http://127.0.0.1/cakeplate/tooltips/tooltip/"+user_id, // get user_id and pass it here
success: function(msg){
$('.class').html(' '+msg); // this is will get result
}
});
Regards
sathia
http://www.sathia27.wordpress.com
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment