the next code work perfect in IE6-9, chrome, opera, firefox2,3,3.6,4,5,6 but doesnt work in firefox 9 and safari for windows.U can see it on http://www.hlahav.co.il/gallery.htm in the litebox of the photoshtml Code (markup): js function escape(event,dont) { var keyCode = (event.which) ? event.which : event.keyCode; if(keyCode==27){ endimg(); } if (dont == undefined) { if (keyCode == 37) { next(); } if (keyCode == 39) { beck(); } } } Code (markup):
the next code work perfect in IE6-9, chrome, opera, firefox2,3,3.6,4,5,6 but doesnt work in firefox 9 and safari for windows.U can see it on [link]http://www.hlahav.co.il/gallery.htm[/link] in the litebox of the photos[br]JS code: function escape(event,dont) { var keyCode = (event.which) ? event.which : event.keyCode; if(keyCode==27){ endimg(); } if (dont == undefined) { if (keyCode == 37) { next(); } if (keyCode == 39) { beck(); } } }
onkeydown works with all major browsers. If you are having problems in FireFox you should install the add-on called Firebug and see what errors it gives you. Provide text from an error log please.