thanks for the reply pradeep

actually my problem is : there are 3 text boxes(with tabindexes given in serial) for which I need to do validate (which should not be empty), so I have written a function to check whether the text box is empty or not, and I am calling this function on 'onblur' event of text box.
now the problem is if I press a tab in first text box the focus is going to 2nd text box, I don't know whether it going before executing the check function or after executing it, so first time it will show alert message and as the first box is empty I change the focus to first box, now as the focus is shifting from second text box to first text box the second text box onblur event is getting fired as it will be empty and like this it is going into infinite loop...

one more problem with the 'onblur' event is even if I am going to some other window that event is firing and executing the check function...

I am trying find a solution.........thinking so many logics.....

if u have please tell me..

one more thing how can we know whether a text box is in focus or not...
can we do something like this textbox.focus == true...

Last edited by prashantSum; 3Nov2005 at 11:25..