开发者

Working with jquery.validationEngine and codeigniter

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 ech开发者_StackOverflow中文版o 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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜