Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

This is the code for stopping post back, this code is not working in safari browser.

C#
$(document).ready(function () {

         $('input:text').keypress(function (e) {
             var keycode = (e.keyCode ? e.keyCode : e.which);
             if (keycode == 13) {
                 return false;
             }
         });

     });
Posted
Comments
Kornfeld Eliyahu Peter 18-Nov-13 5:59am    
Can you explain what do you mean on 'not working'. I run your code on safari and it's seams to do well...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900