javascript in firefox?

Discussion in 'OT Technology' started by NCS, Nov 30, 2005.

  1. NCS

    NCS Active Member

    Apr 2, 2002
    Likes Received:
    i'm noticing different behavoir for javascript code in firefox. do any of you web developpers have a good forum for this kind of problem?

    the problem in particular: there is a page with multiple text fields and buttons associated to a text field. we would like that when hitting "enter" only the active text field's button is pushed. As you can see in the code i've already discovered how to deal with the enter event with netscape navigator and with internet explorer. i now need a firefox option

    function _SSiSE(){return (navigator.appName.indexOf("Microsoft")==0);}
    function _SSPKD(){if(!_SSiSE()){document.captureEvents(Event.KEYDOWN);}document.onkeydown=_SSOKD;}
    function _SSOKD(evt){var isIE=_SSiSE();var k=(isIE?window.event.keyCode:evt.which);if(k!=13){return;}

Share This Page