Feedback: irt.org FAQ Knowledge Base Q57
Feedback on: irt.org FAQ Knowledge Base Q57
Sent by Brian Vozza on April 25, 2001 at 13:43:47: - feedback #2663
Worth: Worth reading
Comments: Otherwise use parent.frameName.focus(); cya
Sent by Frank Carmody on November 13, 2002 at 16:28:36: - feedback #4268
Technical: Not technical enough
Comments: This will work for most browsers. IE 4-5 on mac mac requires something more creative as there is a bug in the focus() method. I used the following function which is called from the body onLoad event.Notice that the function focuses a text field, which then focuses the window/frame itself. The whole sha-bang is placed in a hidden div. See code below. <body bgcolor="#FFFFFF" onLoad="fucFocus()" leftmargin="0" topmargin="0">
<form> <div id="hidden" style="position:absolute; left:0px; top:250px; width:85%; visibility: hidden;"> <input name="txtFocus" type="text" id="txtFocus" onfocus="window.focus()"> <script language="JavaScript"> function fucFocus(){ document.all.txtFocus.focus(); } </script> </div> </form>
Sent by Farruk siddiqui on Friday August 03, 2007 at 10:37:39 - feedback #4878
Worth: Very worth reading
Length:
Technical:
Comments: Thanks a lot. sweet and simple!
|