Home > Javascript | Programming languages > Making a request with Mootools

Making a request with Mootools

March 17, 2009 No Comments

Making a request with mootools is as easier as next lines are:


function doRequest(){

var data = "param1=1&param2=2";

new Request({
           url:'pagetorequest.java',
           method:'post',
           onSuccess: doOnSucess
         }).send(data);
}

function doOnSucess(response){
          alert("I am happy, and you?");
          alert("the response is:" + response);
}

Tags: Code Framework Javascript Mootools Request

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>