Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

I am using Javascript to check mail event.
Its working fine, but the problem is while I am invoking the function using Onblur the focus function is not working.

Script is:
JavaScript
document.getElementById('txtEmail').focus();

Is not working in FireFox 13, when I use it on Onblur.
In IE it is working.
Posted
Updated 10-Dec-12 21:23pm
v3

1 solution

Hi Sarat,

Please try like this this may work.

C#
var elem = document.getElementById("focusID2");
if (elem != null) {
   elem.focus();


I would like to advise you to look into the following link.
Demo link for focus()

Thanks
 
Share this answer
 
Comments
Sarathkumar Nallathamby 11-Dec-12 4:45am    
No. I need : TextBox has to focus while onblur condition dude.. your code is not working..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900