thismimpupe
New Member
No matter what I do, this page doesn't work at all. I want it to focus on the input box on load.\[code\]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Home Screen</title><style type="text/css">input {border:0px;}input:focus {outline:none;}</style></head><body onload="document.getElementById("search").focus()"><input id="search" /></body></html>\[/code\]I know I'm breaking a bunch of rules with this code, so you don't need to say anything about that.EDIT:\[code\]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Home Screen</title><style type="text/css">input {border:0px;}input:focus {outline:none;}</style></head><body onload="document.getElementById('search').focus()"><input id="search" onblur="setTimeout(document.getElementById('search').focus(),10)" /></body></html>\[/code\]EDIT 2:\[code\]<script type="text/javascript">function refocus(){setTimeout(document.getElementById("search").focus(),10);}</script><input id="search" onblur="refocus()" />\[/code\]