onClick, onDblClick have different interpretations in IE, Firefox AND Opera. What to do?
Posted on 2006-05-05
I have a webpage that cyales through preloaded frames (div) as a user presses the *next* and *back* form buttons.
I need it to work properly in IE and Firefox. What is the best possible way to facilitate this?
Here is what happens in the different situations:
1. If I simply assign he "onclick" button to call the function for the button:
IE 6 - The first click flips it but if the second follows too sortly (users cycling frames quickly) the second or every other buton click does not trigger the "onClick" handler.
Firefox 220.127.116.11 - The first click and all other clicks perform normally (this is the behavior I WANT!)
Opera 9.0 beta - Same as IE - DOESN'T register the second swift click.
2. If I assign the SAME function to handle BOTH the onClick and onDblClick events:
IE 6 - Behaves Properly (first, second, ... clicks all go to next page)
Firefox 18.104.22.168 - Now, when i click for the second time it counts as a singl click AND a double click. It flips TWO pages on the second click!
Opera 9.0 beta - STILL DISPLAYS THE SAME BEHAVIOR AS BEFORE - UNBELIEVEABLE!!! It still doesn't flip on the second click!!!! What is wrong with this browser??? I don't even care because this is an internal page and my company doesn't support Opera, but seriously... This is a definate bug.
So the real question is: What is the easiest way/best practice for making this work properly in both IE and Firefox? I want to avoid a real 'hack' if possible. Thanks.