tags:

views:

48

answers:

1

its wrking in ie but not in mozilla wats the alternate

  function preventBackspace(e) {

          var evt = e || window.event;
         // alert(evt);
          if (evt) {
              var keyCode = evt.charCode || evt.keyCode;
             // alert(keyCode);
              if (keyCode === 8) {
                if (evt.preventDefault) {
            evt.preventDefault();
                 } else {
                      evt.returnValue = false;
                 }
              }
          }
      }

infact evt.returnvalue=false is not wrking in mozilla

+2  A: 

I did a simple test (jsfiddle), and your function does work in Firefox. As expected, it never executes the non-standard returnValue part.

Matthew Flaschen
thanx it wrking.... i was getting it wrongu genius
vakas