Tuesday, November 11, 2008

focus field javascript

<script language="javascript" type="text/javascript">
_spBodyOnLoadFunctionNames.push("addAttributes");

function addAttributes() {
var control = document.getElementsByName("WPQ2accountsSearch");

if(control.length > 0)
{
control.item(0).focus();
}
}
</script>

No comments: