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 7807815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:58:21+00:00 2026-06-02T02:58:21+00:00

I have 3 buttons (image links, eventually will evolve to javascript or something better

  • 0

I have 3 buttons (image links, eventually will evolve to javascript or something better though)

Each of these buttons should send a value to a handler script, which does choice 1 if button 1 is pressed, choice 2, so on and so forth.

I’m wondering what the best way to do this is. I DON’T WANT TO USE GET. I’d like to use POST if that’s possible but I don’t think it is. I thought about cookies too but the problem is even though you can call a JS function to create a cookie via a link, you can’t go to the PHP page for processing, within the same click can you?

It would work like the user clicks the button img, then it takes them to the handler script, but the handler redirects them back before they even know they were there.

Again this isn’t a form, I need to do this with a hyperlink. I suppose I could just have a different page for each choice, but I don’t think that’s efficient.

Thanks!

  • 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-06-02T02:58:24+00:00Added an answer on June 2, 2026 at 2:58 am

    If you want the variables to be passed using POST, you could create a form on the page, and have your links execute some javascript code at onClick. They’d set the variable to the desired value, then submit the form. The key lines would be something like:

    document.getElementById("user_choice").value = 2;   // or whatever the value for this link is
    document.getElementById("my_form").submit();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some 10 buttons with image-text and hover states for each. What I
I have two image buttons: <div class=sidebarOptions> <input type=image src=images/homeButton.jpg onclick=#{home.setRendered(1)}/> </div> <div class=sidebarOptions>
I've some CSS problem in Firefox 3. I have several image buttons on my
I have lots of image buttons. User can press any of those button and
I have to buttons, image input that work fine when in the markup like
I have a MasterPage that has two image buttons , and two content pages,
I have an image, as below I made the above bar and buttons as
I have a lot of buttons and by clicking on different button, different image
I have the following links (buttons) on a page that I need to instead
I have a button with an image that links to another page when pressed.

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.