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

  • Home
  • SEARCH
  • 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 9142427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:46:51+00:00 2026-06-17T09:46:51+00:00

I would like to have three (or more) normal buttons, that I would use

  • 0

I would like to have three (or more) normal buttons, that I would use underneath three pictures, only one would have a text “default” the other buttons would have the text “set as default” .

<input type="button" id="button1" value="Default" > 

<input type="button"id="button2"  value="Set as default" > 

<input type="button" id="button3"  value="Set as default" >  

When “set as default” is clicked this button’s text should change to default and also the color should change..(the previous button that was default will now be “set as default”)

  1. How do i do this using jquery for more than two buttons?
  2. When i post this to php how will i know which one was the default?
  3. If you have any other suggestions /code examples instead of buttons to select the
    default picture they are more than welcome
  • 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-17T09:46:52+00:00Added an answer on June 17, 2026 at 9:46 am
    $('input[type="button"]').on('click', function() {
      $('input[type="button"]').val('Set as default');
      $(this).val('Default');
    });
    

    PHP will know by giving them names: (button1, 2, 3) – the value will be “Default”

    <input type="button" id="button1" name="button1" value="Default" > 
    
    <input type="button"id="button2"  name="button2"  value="Set as default" > 
    
    <input type="button" id="button3"  name="button3"  value="Set as default" > 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three jobs that I would like to serialize in Jenkins. They should
I would like to ask you: Imagine that you have a site and there
Is there a script/way, that makes normal CSS :hover more smooth? Idea would be,
I have a tree panel and I would like to associate an action to
I would like to have some space between the same line.. I know there
There are some products for which I would like to have a special checkout
I would like to know what generic requirements are there to have Eclipse headless
I would like to know if there is a way in Android to have
I have edits to my working tree which I would like to continue working
I have a pretty complex database schema and would like to know if there

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.