Home Page, folks!
^ Back to Top

Hey, it's Trady Blix!
We'll use the Contact module and POST some values to it's Send function using jQuery AJAX (.post).
$.post('/app/contact/send/param1/param2/param3',{message:'value'},function(response) {
alert(response);
});
app - being the current directory of the application (Note: app directory can be other directory depending where the application is located e.g. app/somedir unfortunately you have to type the directory in your JS code manually. But for template files you can use System::Link() method e.g. System:Link('contact/send/param1/param2/param3') which will point to the correct link without worrying about the directory of the application)
contact - the module we're calling
send - the method under contact where we will pass the POST and some params
param1 - optional param 1
param2 - optional param 2
param2 - optional param 2
message - the POST variable
value - the POST value
Click to perform Ajax Test
Passing a query string to the homepage:
Put this in the href: <?php echo System::Link('?param=value')?>
Click to pass a query string
Footer!!
Copyright © 2010