I have the following snippet of HTML. I have an application I am passing userid/password credentials to login. When a user logs in, the application opens in a NEW window ("App1"). If a user returns to this page and clicks the link again, I want the open window to come back into focus. I've tried multiple scripts to get it working without success. Any info is appreciated. <form action="details.asp" method="Post" name="App1" target="App1" id="App1" onSubmit="javascript: App1.focus();> <input name="username" type="text" id="username" value="username" /> <input name="password" type="password" id="pssword" value="password" /> <a href="javascript:document.App1.submit();">Open Web Page</a>
Thank you. Using onload="self.focus();" works, but my other issue is that I do not necessary have access to the source of the application. I was thinking I could use the IFRAME as a container, but would like to avoid this option if possible. Any other thoughts are appreciated.