& ldquo; Stop running this script? & rdquo; The message appears when a user clicks on my HTML selection item

advertisements

I created an ASP.net web application last year. I've received a bug report that's troubling me.

There is an HTML SELECT element that appears in a web page for all users. The OPTION elements are populated using jQuery. They have no data- attributes or anything unusual, just inner text and value attributes.

The bug report I've received (and reproduced) says that the program hangs and the "Stop running this script?" message appears when the user clicks on the SELECT element. The only thing I can see that appears to be different between this user and other users is that for this user, the SELECT element contains almost 2000 OPTIONs. However, I know of no reason this should cause the "Stop running this script?" message to appear.

As far as I can tell, there is no event attached to the .click handler on the SELECT, but somehow, a bunch of JavaScript is running each time it is clicked.

I've tried inserting breakpoints throughout the .js file I've written for the page, but none of them are hit in this circumstance. How can I find what code is running and causing the program to hang when the user clicks on the SELECT element?

BTW, I believe that my user is using IE8 with on option to upgrade or use any other browser.

Update in response to comments: To be clear, I am certain that there is some JavaScript code that is causing the program to hang and the "Stop running this script?" message to appear. The problem is that I'm having trouble figuring out exactly which code is causing the problem.

A more succinct way to put the question would be, "When the 'Stop running this script?' message appears in IE8, is there some way to find out where in the JavaScript code the interpreter was reading when the message appeared?"


Possible reasons can be

  1. User is having some plugin installed that is monitoring the SELECT change
  2. User is having the IE debugger running. This will make the script slow

Also IE JavaScript engine is pretty slow

** You should consider changing that SELECT to jQuery autocomplete or something similar.