Need to find which text box has the focus.

T

teddysnips

I have an aspx form with 52 text boxes, each one representing a week.

On another part of the form I have a further 7 text boxes, each
representing a day of the week.

I'd really like to be able to mimic the functionality in the VB6
program on which this is based, which is:

When a text box gets the focus, the "day" text boxes are refreshed to
show the daily data for that week.

I realise that in ASP.NET this might provide a sub-optimal user
experience, as there would need to be a postback each time the "day"
text boxes was refreshed.

As a compromise I propose adding a "Refresh" button on the form, that
would determine which weekly text box has the focus, and refresh the
"day" text boxes accordingly.

Anyone got any ideas how to do this?

Many thanks in advance

Edward
 
A

AMDRIT

Use javascript or vbscript on the client side, you have exposure to many
events.

OnBlur
OnFocus
OnFocusIn
OnFocusOut
OnActivate
OnDeactivate

you may also use document.activeElement
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top