Menu
Hi,
i’m new at the list and a newbie with javascript and dhtml.
What i want is to know if a text field has focus(the cursor inside the field).
<script>
function verifyFocus(fieldId) {
if(the field of the field id has focus) {
alert(“The field has focus!”);
} else {
alert(“The field DOESN’T has focus!”);
}
}
</script>
<input type=”text” id=”name” onMouseOut=”verifyFocus(this)”>
How can i proceed with this if statement in order to get what i want?
Cheers!
Alexandre.