[thelist] [Javascript] click() not working with Safari
J.J.SOLARI
jjsolari at pobox.com
Fri Jun 24 04:22:58 CDT 2005
J.J.SOLARI 18/06/05 15:38 +0200:
>Hello all,
>
>Still polishing up a Web application, that is making it work with
>target browsers (IE5+, Gecko-based browsers, Opera, and Safari), I
>am having a hard time with the later.
>
>Basically, there are accesskeys assigned to some form elements; a
>Javascript script performs some action on them (check or uncheck
>radio buttons or checkboxes, or submit-like buttons) when pressing
a
>particular key. The script simulates the behaviour of a accesskey
>Html attribute, but without a modifier key (alt or ctrl).
Answering to myself...
Say Html code is:
<button id="a_button" type="submit" onclick="a_func()">text</button>
Doing:
document.getElementById( "submit" ).click();
will not work, whereas the click event works fine on a <input>
element.
Short answer:
Safari 2.0 doesn't implement Javascript method click() on <button>
elements.
hih,
JJS.
More information about the thelist
mailing list