[I did see the similar problems solved with AJAX/jQuery, so please read on].
I have a form that a user can fill out – but one of the options on the form allows selection of an image, and when the user goes to do that they are brought to a new page.
This was originally done via get, but my problem is… I need to save all of the information on the form to the session so that I can restore it when the user selects an image and goes back to the first page that had the form.
A HTTP GET may not hold enough data for all the information on my form, so I need to switch to post.
So, here’s my problem… I need the form to POST to one page when I click “Select Image” and another when I click “Submit”. How can I get the form to POST to a different page depending on which button was clicked?
PS: I’d prefer to just use standard javascript/html here. I plan on learning AJAX and moving over to jQuery after a while, but I’m not there yet 🙂
onclick, let each button call different functions. Within these functions, change the action attribute of the form dynamically.Then submit the form.