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

The Archive Base Latest Questions

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

I have to get the selected option data whose option value is known. I

  • 0

I have to get the selected option data whose option value is known. I have the selected option value and I want the data which is wrapped between the option.

For example in the following select:

<select name="oi_report_contact[sex]" id="oi_report_contact_sex">
       <option value="1">Male</option>
       <option value="2">Female</option>
       <option value="3">Other</option>
</select>

I have value 1, I need to get the data “Male” through Jquery or Javascript.

Please note : $('#oi_report_contact_sex').val(); will give 1 and not male, when 1 is selected.

  • 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-17T11:46:23+00:00Added an answer on June 17, 2026 at 11:46 am

    You just have to call

    var content = $('#oi_report_contact_sex option:selected').html();
    

    to get the inner content of the selected option.

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

Sidebar

Related Questions

I have the follwing code. I want to get the value of the selected
I have a select form with different options. I want to get the value
i have two select option with some data: <select id=S1 name=S1> <option value=id1>data1</option> <option
I have an ajax get where I would like to get the selected value
Refresh an int64edit and get selected element. I have an int64edit, when I select
I have a WPF ComboBox named cbFileSize. I try to get is selected value
I have the following element selected: >>> order <Element Order at 0x10364b960> To get
I have a form, in which I need to send data selected via AJAX
I have a html select syntax like : <select id=salary_structure_salary_structure_line_items_attributes_0_payhead_id class=half name=salary_structure[salary_structure_line_items_attributes][0][payhead_id]> <option data-payhead=Earnings
Example Problem: http://jsfiddle.net/whxD3/12/ In knockout I have a select box that I want to

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.