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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:30:19+00:00 2026-06-01T17:30:19+00:00

In a simple dropdown box in IE9, if the user changes the selection and

  • 0

In a simple dropdown box in IE9, if the user changes the selection and then tries to print, the print will render the original option.

Say, I have

<option value="">Select one: </option>
<option value="1">Record 1</option>
<option value="2">Record 2</option>
<option value="3">Record 3</option>

By default, when the page is loaded, “Select one:” is displayed in this dropdown box. If I pick “Record 2”, and then print the page, “Select one:” is printed out inside the box instead of “Record 2” which I have selected.

Firefox can print correctly. Other versions of IE can also do the job. But we would rather not use the compatibility view:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

Because in this case, though the selected value is correctly displayed inside the drop down box, many of our css styles are lost. (such as border-radius)

Does anyone have a good solution? 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-06-01T17:30:21+00:00Added an answer on June 1, 2026 at 5:30 pm

    Here’s a rough function that seems to do the trick, it needs to be tested thoroughly in your environment but seems to be OK at the moment:

    if ($.browser.msie && parseInt($.browser.version, 10) === 9) {
                    $("select").change(function () {
                        var selectedOpt = $(this).find("option:selected");
                        var originalDefaultOption = $(this).find("option[selected]");
                        var text = originalDefaultOption.html();
                        var val = originalDefaultOption.val();
    
                        originalDefaultOption.after("<option value='" + val + "'>" + text + "</option>");
                        originalDefaultOption.remove();
                        selectedOpt.attr("selected", true);
                    });
                }
    

    Basically, IE won’t let you remove the ‘selected=selected’ attribute from the option, even with JavaScript. So I’m just copying the original default option into a new option tag, without copying the ‘selected’ attribute, and I’m putting the ‘selected’ attribute on the newly clicked option. Works in FF and IE9 & 8.

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

Sidebar

Related Questions

When I have simple drop down box <select id=fruits> <option value=apple>Apple</option> <option value=orange>Orange</option> <option
I have a simple dropdown box and jquery to get value from what i
Is there a simple code to populate a dropdown box using Enterprise Library 5.0
I have a simple dropdown and want to get the specific value of an
I have a simple dropdown menu and I'd like to have this menu close/hide
Can anyone help with a small problem. I've got a nice simple CSS dropdown
I have a simple drop down box on a page with the below code:
I have the following HTML dropdown box on the index view of the Search
I have an Activity with an AutoComplete box on it. Whenever the text changes,
I have a simple form for a hotel accommodation tool. User selects the number

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.