-2

I have a form with 100 fields ,how do i post the data to a php using ajax with out refreshing the page,also i do not want to concatenate the field values without getelementbyid in the xmlhttprequest.

Thanks

2
  • Pick a JavaScript library, use its form serialization and AJAX methods. Commented Jul 29, 2011 at 10:14
  • Or iterate through the dom and get all the values of the form fields and make a string... you can have it as a function... please refer this link stackoverflow.com/questions/169506/… Commented Jul 29, 2011 at 10:18

1 Answer 1

2

in jQuery could be something like

$.post("/path", $("#form-id").serialize(), function(ev){
  alert("done!");
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.