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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:56:16+00:00 2026-06-12T20:56:16+00:00

I have this, <select id=rid style=border: 1px solid #ccc; name=rid> <option value=1>Option 1</option> <option

  • 0

I have this,

<select id="rid" style="border: 1px solid #ccc;" name="rid">
    <option value="1">Option 1</option>
    <option value="2">Option 2</option>
    <option value="3">Option 3</option>
    <option value="4">Option 4</option>
    <option value="5">Option 5</option>
    <option value="6">Option 6</option>
</select>

In my script, I want to know if for instance Option 1 is being selected or being clicked. What I’m trying here is to know an option is being clicked via the <option>‘s attribute value. If an option is being clicked I will alert() something telling me that that option is being clicked. How would I do that in my js script?

  • 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-12T20:56:18+00:00Added an answer on June 12, 2026 at 8:56 pm

    If you concerned about clicks and not change then use .click event.

    $('#rid').click(function () {
       if ($(this).val() == "1") {
          console.log("option 1 was clicked");
         //^- Using alert here would block the selection.
       }
    });
    

    Above is based on what is in OP –

    If an option is being clicked I will alert() something telling me that that option is being clicked.

    As per –

    I want to know if for instance Option 1 is being selected or being clicked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this, <select id=rid style=border: 1px solid #ccc; name=rid> <option value=1>Option 1</option> <option
I have the following HTML: <select id=testMe name=test multiple=multiple size=5 style=width:270px> <option value=test1>test1</option> <option
If I have this select: <select id=days> <option value=0>Today</option> <option value=1>Yesterday</option> <option value=7>Last week</option>
ok so i have some select tags of cities <select onchange=storeCity(this.value, false) name=search[city] id=search_city
I have this select input in my form that I want to access via
We have this statement: (SELECT res_bev.bev_id, property_value.name AS priority FROM res_bev, bev_property, property_value WHERE
I have an select on my page with the value of Test One <option
I have this query in SQL Server 2005: SELECT J.JobID, dbo.tblCustomers.Name AS CustomerName, J.CustomerJobNumber,
I have this select input with simple_form: <%= f.input :board, :collection => Board.where(:user_id =>
i have this SELECT COUNT(1) cnt, a.auther_id FROM `posts` a LEFT JOIN users u

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.