I am trying to use Mozilla Firefox Firebug Console to test some code. Below is the line I am trying to execute to focus on the link:
document.getElementById('DEPT_TBL_DESCR$prompt').focus();
But it keeps returning this error in Firebug Console:
TypeError: document.getElementById(...) is null
Does anyone know why or how I could focus on that link/img?
Below is the code:
<a href="javascript:pAction_win0(document.win0,'DEPT_TBL_DESCR$prompt');" tabindex="35" id="DEPT_TBL_DESCR$prompt" name="DEPT_TBL_DESCR$prompt"><img border="0" align="absmiddle" title="Look up New Department ID (Alt+5)" alt="Look up New Department ID (Alt+5)" src="/cs/hr34/cache/PT_PROMPT_LOOKUP_1.gif"></a>
This is related to this IE error message: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.