freelance84 Posted June 10, 2011 Share Posted June 10, 2011 How could i send a forms values to javascript if the number of elements within the form depend on user actions? Essentially I want to be able to send this said forms values along with their titles to the server via AJAX. However how can i instruct a JS file to get and check the values of this form when I do not know all the ID's to get? I have found a few tutorial sites using both raw javascript and using jquery to send a form with out a page refresh but all the examples know what form elements to get. Is there something similar in javascript to php's $_POST array? Or will i have to submit the form with iFrames or something?? Quote Link to comment Share on other sites More sharing options...
WebStyles Posted June 11, 2011 Share Posted June 11, 2011 did you even try to find the answer? first page that showed up on google: http://pietschsoft.com/post/2006/06/01/JavaScript-Loop-through-all-elements-in-a-form.aspx Quote Link to comment Share on other sites More sharing options...
freelance84 Posted June 11, 2011 Author Share Posted June 11, 2011 Sorry i missed that. Clearly wasnt looking for the corrrect thing (hence the links above) Thansk Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.