문제

I am trying to make a form which would check if an username is available or not. I started to use jquery.validationEngine (link) because it looks extremely simple. However, since I'm using codeigniter, I have a problem with that validation... Example on the mentioned site looks like:

$("#formID").validationEngine({
 ajaxSubmit: true,
  ajaxSubmitFile: "ajaxSubmit.php",
  ajaxSubmitMessage: "Thank you, we received your inscription!",
                ajaxSubmitExtraData: "securityCode=38709238423&name=john",
 success :  false,
 failure : function() {}
})

What I need is to change ajaxSubmitFile: "ajaxSubmit.php", line to match my codeigniter's MVC pattern, so I tried something like

ajaxSubmitFile: "<?php echo site_url('register/check_user'); ?>",

where register is my controller and check_user is a function within that controller. No matter what I try here I get 404 error in validationEngine debugger.

Does anyone know how to resolve this problem?

도움이 되었습니까?

해결책

Ok, I found an answer...
I was editing wrong file all the time... I was supposed to edit jquery.validationEngine-en.js... There is a line which points to validation file... After editing that line, I could see $_POST data in my controller...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top