View Single Post
Old 11-01-2012, 11:22 AM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
anyone use the prototype js framework?

Curious how to set an action through the ajax call

Code:
function vote(id, rate, img, event) {
    new Ajax.Request(MyAjax.ajaxurl, {
        method: "post",
        parameters: "rate=" + rate + "&id=" + id,
        onSuccess: function(transport) {}
    });
}
need something along the lines of jquery way of doing data: {action: my_action},
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote