473,507 Members | 8,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need to find which text box has the focus.

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

Jan 19 '06 #1
1 1146
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

<te********@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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

Jan 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
13984
by: Mark | last post by:
Hi, Im trying to validate a form, all the validating works apart from one field. This particular field must consist of the first 2 characters as letters, & the following 5 as numbers. And if it...
8
2002
by: George Hester | last post by:
In a page I have when the user left-clicks the page a Input box for a form gets the focus. But if the user right-clicks the page the Input box is not getting the focus. I'd like the Input box to...
9
4500
by: CW | last post by:
I wrote an HTML based chat application. The front end is built entirely on HTML + javascript. Essentially, I have a hidden frame that's refreshed frequently and any new messages are displayed in...
18
2435
by: Euphor2 | last post by:
I'm in school, taking a VB .NET 2003 course, and the teacher taught us how to use Sender.Focus() to return focus to the control from which focus was received. However, when I got home, and tried...
1
1165
by: teddysnips | last post by:
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...
4
1590
by: newbie | last post by:
Hi, I have a windows form written in C#. The form has multiple textboxes and multiple buttons. I want to create a form where when the users clicks on a particulat textbox and then clicks on a...
20
4222
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
3
14959
Frinavale
by: Frinavale | last post by:
I've been searching for a little while now and can't figure out how to determine if a particular element has focus. I'm changing either a text box representing the Hours in time or Minutes in time...
2
1636
by: dougmcmurtry | last post by:
I have a web app that is going on a touch screen computer with no keyboard, so I have to allow them to enter numeric data into text fields through a UserControl that I built. All I need to find is...
10
3254
by: Gary | last post by:
I'm trying to find a way to determin which window Within-Another-Program currently has the focus. THE SITUATION: (Skip down to "My Question" if you don't want the background...) * This is...
0
7221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7109
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7029
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.