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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:57:55+00:00 2026-05-26T15:57:55+00:00

Here’s what I’m trying to do: You open the page and there’s a select

  • 0

Here’s what I’m trying to do:
You open the page and there’s a select box where you choose option A, another select box, option B, appears and shows options depending on what option the user chose for A.

I managed to get this far with a little help, but I want to customise the select box and the only way I could find a way to do that which supports the onchange callback was implementing jQueryUI. I can get it to make option B appear, but it wont change the options.

Here’s the (very messy) code I have so far:

  <head>
    <meta content='text/html; charset=utf-8' http-equiv='content-type' />
    <title>Jailbreak</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <link href="scripts/reset.css" rel="stylesheet" type="text/css" />
    <link href="scripts/styles.css" rel="stylesheet" type="text/css" />
    <link rel="Stylesheet" href="scripts/jquery-ui.css" type="text/css">
    <link rel="Stylesheet" href="scripts/ui.css" type="text/css">
    <script type="text/javascript" src="scripts/jquery-ui.js"></script>
    <script type="text/javascript" src="scripts/ui.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
        $("select[name='select1']").selectmenu();
        $("select[name='select2']").selectmenu();   
    });
    </script>
</head>
<body>
<script>
function Select1(){
    var phoneselect=document.getElementById("select1");
    var phoneid = phoneselect.options[phoneselect.selectedIndex].value;
    if( phoneid == 'p1' ){
    document.getElementById( 'select2' ).length=0;
    document.getElementById( 'select2' )[0]=new Option("1.1", "1.1", true, false);
    document.getElementById( 'select2' )[1]=new Option("1.2", "1.2", false, false);
    document.getElementById( 'select2' )[2]=new Option("1.3", "1.3", false, false);
    }
    else if(phoneid == 'p2' ){
    document.getElementById( 'select2' ).length=0;
    document.getElementById( 'select2' )[0]=new Option("1.2", "1.2", true, false);
    document.getElementById( 'select2' )[1]=new Option("1.3", "1.3", false, false);
    document.getElementById( 'select2' )[2]=new Option("1.4", "1.4", false, false);
    }
    $('#fwselector').show('slow', function() {
        });
}
</script>
<div id="mainimg"><img src="images/devices.png"/></div>
<div id="formcontainer">
    <form>
        <select id="select1" name="select1" onchange="Select1();">
            <option value="Phone" disabled="disabled" >Phone</option>
            <option value="p1">iPhone 2G</option>
            <option value="p2">iPhone 3G</option>
            <option value="p3">iPhone 3GS</option>
            <option value="p4">iPhone 4</option>
            <option value="p5">iPhone 4S</option>
        </select>
    </form>
    <div id="fwselector" style="display: none">
        <select  name="select2" id="select2">
            <option value="Firmware" disabled="disabled" selected="selected">Firmware</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
        </select>
    </div>
</div>

</body>
</html>

I should mention that I’m not very familiar with anything other that HTML or CSS at all, I’ve just done this by merging things together from loads of different guides.

Thanks.

  • 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-26T15:57:55+00:00Added an answer on May 26, 2026 at 3:57 pm

    Is this what you are looking for?

    http://www.appelsiini.net/2010/jquery-chained-selects

    Very simple solution to chained select boxes.

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

Sidebar

Related Questions

Here is the link to the offending page: http://www.wrightspecialty.com/brokers-agents-questionnaire.html?view=foxcontact There's a limitation to the
Here's what I'm trying to do... It's quite simple and obviously there must be
Here is the code in a function I'm trying to revise. This example works
Basically, what I'm trying to create is a page of div tags, each has
Here's what I'm trying to accomplish with this program: a recursive method that checks
Here is the css: #content ul { font-size: 12px; } I am trying this:
Here is the problem that I am trying to solve. I have two folders
Here's what I'm trying to do: the user submits a time in pacific, once
here is my code for the query in php: $query3 = mysql_query(SELECT * FROM
Here are two example queries: SELECT NOW(), NOW() + INTERVAL 1 HOUR + INTERVAL

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.