Lines 1-18
Link Here
|
1 |
var prevent_nav = window.Event ? true : false; |
1 |
$(document).ready(function() { |
2 |
if (prevent_nav) { |
2 |
// We don't want to apply this for the search form |
3 |
window.captureEvents(Event.KEYDOWN); |
3 |
$("#doc3 form").keypress(function (e) { |
4 |
window.onkeydown = NetscapeEventHandler_KeyDown; |
4 |
if( e.which == 13 |
5 |
} else { |
5 |
&& e.target.nodeName != "TEXTAREA" ) { |
6 |
document.onkeydown = IEEventHandler_KeyDown; |
|
|
7 |
} |
8 |
|
9 |
function NetscapeEventHandler_KeyDown(e) { |
10 |
if (e.which == 13 && e.target.type != 'textarea' && e.target.type != 'submit') { return false; } |
11 |
return true; |
12 |
} |
13 |
|
14 |
function IEEventHandler_KeyDown() { |
15 |
if (event.keyCode == 13 && event.srcElement.type != 'textarea' && event.srcElement.type != 'submit') |
16 |
return false; |
6 |
return false; |
17 |
return true; |
7 |
} |
18 |
} |
8 |
}); |
|
|
9 |
}); |
19 |
- |
|
|