Welcome Guest, Not a member yet? Register   Sign In
JQuey & Form Validation
#5

[eluser]jstine[/eluser]
Thanks for helping with this.

Using firebug the response I get from the post is as follows:

{"result":"error","msg":""}

It looks like no error message is being generated.

My javascript looks like this:
Code:
function createAccount()
{
    var user_first = $("input#su_first_name").val();
    var user_last = $("input#su_last_name").val();
    var user_email = $("input#su_user_email").val();
    var user_pass = $("input#su_user_pass").val();
    var user_confirm = $("input#su_confirm_pass").val();
    $.ajax({
          type: "POST",
          url: "<?=base_url()?>my_codeigniter_fuction",
          data: ({'su_first_name':user_first,'su_last_name':user_last,'su_user_email':user_email,'su_user_pass':user_pass,'su_confirm_pass':user_confirm}),
          dataType:'json',
          success: function(object) {
                if(object.result=='error'){
                    alert(object.msg);//shows the validation errors.
            }
          }
        });
}


Messages In This Thread
JQuey & Form Validation - by El Forum - 02-15-2011, 05:49 PM
JQuey & Form Validation - by El Forum - 02-15-2011, 07:32 PM
JQuey & Form Validation - by El Forum - 02-16-2011, 11:49 AM
JQuey & Form Validation - by El Forum - 02-16-2011, 03:08 PM
JQuey & Form Validation - by El Forum - 02-18-2011, 09:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB