javascript click and IE
I have the following setup:
Js prototype lib.
A span that has an onclick event that calls a function sort of the following:
function onClickSuperFunction() {
alert('Super function called');
// Bla bla bla many epic things
if (someCondition) {
$('selectorForSameSpan').click();
// selectorForSameSpan is a selector for the element that was
originally clicked (first click is manunal)
}
}
In all browsers except IE, everything is ok. In IE the click is not fired
(is fired when I manually click the element, but not the event from "if").
Also, if I change the selector and simulate a click on any other element (
$('anyOtherSpanForExample')), it works ok (the function is called).
So... does IE prevent automatic clicks on the same element? Maybe an
antispam something? And... any work-around? I really need that click.
Note: Same thing happens if I use the prototype "fire".
Thank you for your help.
No comments:
Post a Comment