Bill in Kansas City wrote on 12 mei 2009 in comp.lang.javascript:
> IE7, Windows XP SP3 (and presumably, IE6)
>
> I'm working with a menu system that structures menu items like so:
>
> <div id="container">
> <div onclick="document.location = 'some href'" id="item">
> <a href="some href">
> Link Text Here
> </a>
> </div>
> </div>
>
> The div onclick event has a five to eight second delay before the
> browser reacts. If I remove the onclick event of the item div, the
> browser reacts instantaneously. Firefox does not exhibit this
> behavior.
>
> I've tried event.cancelBubble on the div onClick to see if that was
> the cause, but there was no change, I still get the delay.
>
> I can't afford the time to write a new menu system, and as always the
> boss is breathing down my neck to find a solution. (And he won't
> accept, "It's just a quirk with IE" as an answer.) Any ideas how to
> eliminate the delay?
Educate your boss.
This educating is one of the most important tasks in programming.
You are the doctor, he is the patient.
He pays, but you should let him be aware of your expertise,
and give him advice that he can only ignore to his peril.
[or she]
And next time, do not programme such strange scripts.
Use timeouts, or better use bubble breakers like "return false".
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
|