Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6812729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:29:05+00:00 2026-05-26T20:29:05+00:00

[I did see the similar problems solved with AJAX/jQuery, so please read on]. I

  • 0

[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 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:29:05+00:00Added an answer on May 26, 2026 at 8:29 pm

    onclick, let each button call different functions. Within these functions, change the action attribute of the form dynamically.

    document.forms['yourform'].action = 'your intended page'; 
    

    Then submit the form.

    document.forms['yourform'].submit(); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Did anyone try to read programmatically an Alibre Design CAD file? I see that
First let me say that I did see this article: How to remove AspxAutoDetectCookieSupport
Looking for a proven to work algorithm for production. Did see this example but
Earlier I had a problem when an inner anonymous class did not see a
Did you used Dynamic websites before? you see its a good way for making
Did you ever have to choose between WISA or LAMP at the beginning of
Did you ever use Oracle auditing features on a production db? How did that
I have a windows form application which needs to be the TopMost. I've set
I have a simple html login form, deployed on Xcode using phonegap framework. When
This problem has been solved thanks to your suggestions. See the bottom for details.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.