![]() |
JQuery Validation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: JQuery Validation (/showthread.php?tid=4455) Pages:
1
2
|
JQuery Validation - El Forum - 11-26-2007 [eluser]RobbieL[/eluser] Sorry to post another JQuery/Validation post, but I had a hunt and couldn't see a thread looking at my problem. I've managed to get JQuery to use the CI validation, but I can only get it working to validate one input field. My form field has multiple input fields, but I'm unsure how to post the value of them all to the CI controller that does the validation. I'm currently at work so can't post my code at the moment, but any feedback would be greatly appreciated. Cheers. JQuery Validation - El Forum - 11-26-2007 [eluser]hostingx[/eluser] use action="Path to your controller i.e. http://site.ext/controller/function" <form method="POST" action="Path to your controller i.e. http://site.ext/controller/function"> </form> JQuery Validation - El Forum - 11-26-2007 [eluser]Phil Sturgeon[/eluser] Post your code and I will help you out on this one, this is something I never got round to working on. JQuery Validation - El Forum - 11-26-2007 [eluser]xwero[/eluser] To get all the values you would have to do something like Code: var post = ''; JQuery Validation - El Forum - 11-26-2007 [eluser]RobbieL[/eluser] Cheers for the responses. I'm still at work, but can provide some code off the top of my head. Code: $(function(){ It's just from memory, so it might not be 100% correct. JQuery Validation - El Forum - 11-26-2007 [eluser]bijon[/eluser] Quote:var post = ''; YOu can do all the above things in just single line Quote:var str = $("form").serialize(); Quote:you can check the Jquery serialize However i have done exactly what you have done. If you nedd the solve then you can again request .. Now you can play with that.. ![]() Enjoy you can check the Jquery serialize JQuery Validation - El Forum - 11-26-2007 [eluser]xwero[/eluser] Nothing beats jQuery power (I even have a tattoo of the logo ![]() JQuery Validation - El Forum - 11-27-2007 [eluser]syntax error[/eluser] I use XML response from codeigniter validation to validate form data. The XML response is rendered simply using a view. Validation errors are stored within XML response. Perhaps this will help? Code: function ajaxSubmit(form) { This line: [removed] = strRedirect; should be: [removed] = strRedirect; Lol hmm this forum does not like ( window . location ) JQuery Validation - El Forum - 11-27-2007 [eluser]xwero[/eluser] @richard : if you want to show javascript some parts will be removed because of the filtering on the forum so to show your code properly you can use a html entities where needed. Maybe there should be a sticky about this. JQuery Validation - El Forum - 11-27-2007 [eluser]nmweb[/eluser] On a side note, the next version of the validation plugin for jQuery will have Ajax checking integrated. It'll be much easier then ![]() |