Welcome Guest, Not a member yet? Register   Sign In
how to check email exist with Jquery and ajax?
#2

[eluser]Silviu[/eluser]
Indeed, CI allows (by default) only certain characters in the URL. You can change those characters in your application config file.

However, my suggestion is to simply use POST when sending your AJAX request.

Should be something along these lines in your script:
Code:
$.ajax({
                     url : baseurl + 'admin/user/checkemail/',
                     data: {useremail:email},
                     cache : false,
                     type: 'POST',
                     success : function(response){
                         $('.checkEmail').removeClass('preloader');
                         if(response == 'userOk') $('.checkEmail').removeClass('userNo').addClass('userOk');
                         else $('.checkEmail').removeClass('userOk').addClass('userNo');

                     }
                 })
And in your controller do this:
Code:
public function  checkemail(){
        $email = $this->input->post('useremail');
        $query = $this->user_model->checkemail($email);
        if($query == 0) echo 'userOk';
        else echo 'userNo';
    }

Give it a shot, see how it goes.


Messages In This Thread
how to check email exist with Jquery and ajax? - by El Forum - 05-19-2012, 03:23 AM
how to check email exist with Jquery and ajax? - by El Forum - 05-19-2012, 07:12 AM
how to check email exist with Jquery and ajax? - by El Forum - 05-19-2012, 11:35 AM
how to check email exist with Jquery and ajax? - by El Forum - 05-19-2012, 12:18 PM
how to check email exist with Jquery and ajax? - by El Forum - 05-22-2012, 06:04 AM
how to check email exist with Jquery and ajax? - by El Forum - 05-23-2012, 04:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB