JQuery Validation |
[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.
[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>
[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.
[eluser]xwero[/eluser]
To get all the values you would have to do something like Code: var post = '';
[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.
[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
[eluser]xwero[/eluser]
Nothing beats jQuery power (I even have a tattoo of the logo )
[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 )
[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 |
Welcome Guest, Not a member yet? Register Sign In |