Forum : How to set the focus in an element using Javascript?
Brief description  about Online courses   join in Online courses
View Sheetal  Panday 's Profile

How to set the focus in an element using Javascript?

focusing an element using javascript..
Asked by Sheetal Panday | Nov 9, 2009 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Sheetal,

You got to use "focus" property.

Here is an example:

<script language="javascript">
function setFocus()
{
if(focusElement != null)
{
document.formname.myelementname.focus();
return false;
}
}
</script>
Nov 9, 2009