I will like to make a pop-up with a very simple formular, but when it pop-up I will like to have FOCUS on the input field. That don’t seem to work.
The code are form here: http://jquery.com/demo/thickbox/
Can you help me?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ThickBox 3.1</title>
<style type="text/css" media="all">
@import "thickbox.css";
</style>
<link rel="alternate stylesheet" type="text/css" href="css/1024.css" title="1024 x 768" />
<script src="jquery-latest.js" type="text/javascript"></script>
<script src="thickbox.js" type="text/javascript"></script>
<script src="js/global.js" type="text/javascript"></script>
</head>
<body>
<p style="padding-top:10px"><input alt="#TB_inline?height=100&width=300&inlineId=myOnPageContent" onClick="document.getElementById('myControl').focus();" title="Type in new Bnumber" class="thickbox" type="button" value="Show" />
<div id="myOnPageContent">
<center>
<br><br>
<form name="input" action="" method="post">
<table>
<tr>
<td>
<b>Username: </b> <input id="myControl" type="text" name="user" />
</td>
</tr>
<tr align="right">
<td>
<input type="submit" value="Submit" />
</td>
</tr>
</table>
</form>
</center>
</div>
</body>
</html>
If in the head of the file you put,
Does that now place the focus on the input field? Once you click on the button the fires the popup, it will wait 1 sec before it places the focus on the input field.