<body onLoad=“window.focus()”> kills JS form validation

Notice: This thread is very old.
richard
Member | 60
+
0
-

Hi. This is pretty wierd. Body with window.focus() on load makes JS form validation not working in IE, in FF you get highlated inputs with text in boubles instead of alert message. Without onLoad it works with alerts in both – IE and FF. Does anyone knows a hack? This is for an Intranet app. and IE is a must…

David Grudl
Nette Core | 8218
+
0
-

Try use this:

<body>
<script>
body.onload="window.focus()";
</script>