It already loads all the functions see the init function, then at the bottom you
can see that it loads itself.
The only way that I know how it to check the page post value then send an ajax call.
Code:
$(document).ready(function(){
$("#button").on('click',function(){
var name = $('#name').val();
var email= $('#email').val();
var data = 'name=' + name + '&email=' + email;
$.ajax({
url: 'login_processor.php',
type: "POST",
data: data,
cache: false,
dataType: "JSON",
success: function(data){
if(data.error_name){
alert(data.error_name);
return false;
}
if(data.error_email){
alert(data.error_email);
return false;
}
}
});
});
});
//login_processor.php
$error_name = null;
$error_email = null;
if(empty($_POST['name'])){
$error_name = 'Please Enter Name!';
}
if(empty($_POST['email'])){
$error_email = 'Please Enter Email!';
}
echo json_encode(array('error_name'=>$error_name, 'error_email' => $error_email));
Something like that you need to set it up for your stuff.
The url would point to your controller method.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )