input type text and onKeyDown not working under IE
- by dygi
Hi there. I am writing a WWW application, it has to run under IE. I have the problem with the code that runs under FF, but i can't get it running under IE.
// JS code
function test()
{
if (window.event.keyCpde == 13)
window.location.href.ssign("myPage.php");
}
I've tried some similar ways around window.location and location.href, also document.location. I've read that IE has problems with that, so i ask for a solution.
The goal is, that page reloads after typing in some text into <input type='text' name='item_code' onKeyDown='test()'> and click enter. So the result is similar to pressing submit type button below the text input.
Within IE it reloads the same page and nothing happens. In FF it correctly works.