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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:32:42+00:00 2026-05-22T02:32:42+00:00

I have a select tag that looks like this: <select name=TZSelector id=TheTZSelector> <option>add another

  • 0

I have a select tag that looks like this:

<select name="TZSelector" id="TheTZSelector">
  <option>add another timezone</option>
  <option>------------------------------------------------------</option>
  <option></option>
  <option value="-8.00">(Pacific Time) San Francisco</option>
  <option value="-7.00">(Mountain Time) Denver
......
</select>

How can I return all the values that are in the options. Notice that option 1,2 and 3 don’t have values but that all others do.
I’m looking for something like this:

$(...).each(function () { MyFunction takes the value of $(this) as parameter });

That way, I can write MyFunction and iterate through the collection of options.

Thanks for your suggestions.

  • 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-22T02:32:43+00:00Added an answer on May 22, 2026 at 2:32 am

    This will select all option’s that have values;

    $('select > option[value]').each(function() {
      // Your magic here
      // $(this).val() is the value of the option
    });
    

    Fiddle: http://jsfiddle.net/8PHDp/1/

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

Sidebar

Related Questions

I have a select tag that looks like this: <select style=background:#fa7171; color:#FFFFFF; name=product_type_sub id=product_type_sub
I have array of select tag. <select id='uniqueID' name=status> <option value=1>Present</option> <option value=2>Absent</option> </select>
I have an xml file that looks like this: <args> <sometag value=abc /> <anothertag
i have select <select id=parentId name=parentId><option value=1>ФАСАДНАЯ ШТУКАТУРКА&lt;BR /&gt;&lt;B&gt;&amp;#0171;STUC-O-FLEX&amp;#0187;&lt;/B&gt;</option> <option value=2>ФОНТАНЫ И САДОВАЯ МЕБЕЛЬ&lt;BR
I have an xml file that looks like this; <Employee> <EmployeeName>Burt Reynolds</EmployeeName> <EmployeeTitle>Bad Ass</EmployeeTitle>
I have a form with a select dropdown, and my select tag looks like
I have a select_tag with options_for_select that looks like this: <%= select_tag respondent, options_for_select(1..5,
I have a form partial that looks like this: <%= form_for(@pool) do |f| %>
I have a switch statement in a Crystal Report that looks like this: stringvar
I have an xml document that looks like this. <?xml version=1.0?> <services> <service sn=1

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.