When i construct my input manually i can focus on it however when i use a JSF tag to generate my inputs the form name is appended to the id and i can't reference it anymore.
I've tried
$("#username").focus();
and
$("#loginForm:username").focus();
without any luck. Any advise?
here is generated jsf html:
<input id="loginForm:username" type="text" name="loginForm:username" size="30" />
This is my how i'm triggering the call...
$(document).ready(function() {
alert("checkA");
$("#username").focus();
alert("checkB");
});