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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:50:13+00:00 2026-05-26T17:50:13+00:00

Since I’m creating a HTA code I’m stuck with IE :( We needed to

  • 0

Since I’m creating a HTA code I’m stuck with IE 🙁

We needed to trap the change event in a <select> element, but guess what, IE does not support that event.

So I created a way to mimic it. With a <input type="text"> that when it is being click show the <select> just below. That part works fine. The problem is, I want to hide the select when the user click outside the select.

I tried to catch a click on the body, it works fine the first time but the second time the select gets hidden try away.

Here a simplify version of the code:

$('.product').live('click',function(){
    // Show the <select id="select"> code goes here

    // this is the event to close the select
    $('body').die().live('click', function(){ $('#select').fadeOut(250); return;});

    // get the click on the select element
    $('#select').die().live('click',function(){
       // kill the close the select
       // THIS IS THE .die() THAT DOES NOT WORK
       $('body').die();

});

Question
Is there something wrong with this code? OR is there a better way to do this? Remember I’m stuck with IE.

  • 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-26T17:50:15+00:00Added an answer on May 26, 2026 at 5:50 pm

    Internet Explorer 7 and up (and probably 6, since IE7 is mostly IE6 with lipstick, but I can’t test that easily) do support the change event. Here is a jsfiddle with a really simple demo.

    It’s definitely true that IE does weird things with events. For example, “change” won’t bubble (from <select> at least, and probably other things), but jQuery patches over that for you. Also there’s the classic issue with checkboxes and radio buttons, which don’t fire “change” until they lose focus (which makes it basically useless). For those, I find that “click” works fine.

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

Sidebar

Related Questions

Since Objective-C is basically an extension of C, Does the code get converted to
Since HTA applications are hosted within MSHTA.exe how does one provide a manifest? Plus
Since hist() of the base R does not report percentages (and the freq=FALSE) does
Since yesterday suddenly my Eclipse does not work anymore. The error is Failed to
Since I've known about Node.js, I've always been a fan of it. But today
Since the pages are stored in address_space within each inode, how does the background
Since the readers don't change anything, why we need ReaderLock?
Since Sharepoint Foundation does't have integration services for InfoPath, I'm looking for a simple
Since the C# using statement is just a syntactic sugar for try/finally{dispose}, why does
Since java does not support multiple inheritance I have a problem getting this to

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.