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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:39:45+00:00 2026-06-11T23:39:45+00:00

I have two drop down list items in select tag first select tag has

  • 0

I have two drop down list items in select tag

first select tag has list of year
second select tag has list of month

<SELECT id="year" onchange="showData();">
  <OPTION VALUE="2012">2012
  <OPTION VALUE="2011">2011
  <OPTION VALUE="2010">2010
  <OPTION VALUE="2009">2009
  <OPTION VALUE="2008">2008
</SELECT>

<SELECT id="month" onchange="showData();">
  <OPTION VALUE="jan">jan
  <OPTION VALUE="feb">feb
  <OPTION VALUE="mar">mar
        .
        .
  <OPTION VALUE="dec">dec
</SELECT>

so how i could change month after 5sec automatically & 60sec for year

what would be my jquery

function changeMonthYear() {    
    //what to code here to change option of select tag
    //automatically after some time 
    //say 5 sec per month & after 60 sec year will be changed
    showData();    
}

showData() {    
    //some logic will show data for selected year & month    
}

how to get fix it

  • 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-11T23:39:46+00:00Added an answer on June 11, 2026 at 11:39 pm

    try it

    function changeYear() {
    
            $('option:selected', '#year').removeAttr('selected').next('option').attr(
                    'selected', 'selected'); //your id of select tag is 'year'
    
            showData();
    
        }
    
        function changeYearMonth() {
    
            $('option:selected', '#month').removeAttr('selected').next('option')
                    .attr('selected', 'selected'); //your id of select tag is 'month'
    
            showData();
    
        }
    
        setInterval(changeYear, 60000);
        setInterval(changeYearMonth, 5000);
    
        showData(){
    
        //some logic will show data for selected year & month
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have two dropdown list. first drop down:1 enter code here <form:select path=custName id=custName>
I have one drop down list in my page, which contains two options. What
I have a 'select' drop-down with a list of players' names, which by default
I have a page with a ScriptManager, a generic HTML drop-down list ( <select>
I have two drop down lists. I need a selection made in the second
I have two drop down menus where the options are not get from the
I have a drop down which has a method which binds data to it:
I have a drop down list that is used to filter data from a
I have two items in the Dropdown list and i have the code for
I have two tables: I want to fill an ASP.NET server control drop down

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.