Jump to content

radio button/drop down not working properly in IE


Recommended Posts

my code below works perfect in Mozilla and Chrome but not in IE8, when i select a Radio button in IE its showing other options for other Radio button, need help in fixing the issue in IE8

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.chained.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>

<link rel="stylesheet" href="style.css" />
<script type="text/javascript" src="infratool.js"></script>

$(function() {


    $("#Category").change(function() {
        window.location = $(this).val().split(" ")[0];
        window.location.href = loc;


<table width="392" border="0">
<td colspan="2" align="center"><form id="form1" name="form1" method="post" action="">
<td align="center">
<label><input name="Radio1" type="radio" id="TestA" value="TestA" onclick="showSelect();" />TestA</label>
<label><input name="Radio1" type="radio" id="TestB" value="TestB" onclick="showSelect();" />TestB</label>
<div id="div-id" align="center"><select name="Category" id="Category" class="hide">
<option value=" TestA TestB" selected="selected">--</option>
<option value="TestA1.php TestA">TestA1</option>
<option value="TestA2.php TestA">TestA2</option>
<option value="TestA3.php TestA">TestA3</option>
<option value="TestA4.php TestA">TestA4</option>
<option value="TestA5.php TestA">TestA5</option>
<option value="TestB1.php TestB">TestB1</option>
<option value="TestB2.php TestB">TestB2</option>
<option value="TestB3.php TestB">TestB3</option>
<option value="TestB4.php TestB">TestB4</option>
<option value="TestB5.php TestB">TestB5</option>
<option value="TestB6.php TestB">TestB6</option>
</select><input type="submit" value="Go" id="submit"/>

here are the other java scripts ive been using

//Show Select option after clicking Radio button:

function showSelect() {
                var select = document.getElementById('Category');
                select.className = 'show';
//Select option, separates the link from Class


    var select = $('#Category'),
        options = select.find('option');

        var visibleItems = options.filter('[value*="' + $(this).val()  + '"]').show();

        if(visibleItems.length > 0)

$(function() {


    $("#Category").change(function() {
        window.location = $(this).val().split(" ")[0];
        window.location.href = loc;


and here is the screenshot in Firefox and IE8 respectively.


syR72.png              OxcO8.png

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.