PC Review


Reply
Thread Tools Rate Thread

Any way to tell what field last had focus?

 
 
Mufasa
Guest
Posts: n/a
 
      4th Oct 2007
Is there a way to tell what the last field was that had focus? Specifically
I want to have it so that when a person clicks off of a field with
autopostback=true, I want to know the field they went to and set the focus
for that when the page reloads.

TIA - J.


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      4th Oct 2007
create a hidden field lastfocus, and add a onfocus event to each control
that stores its id in the hidden field.

you approach is probably bad. when run locally on your desktop, the
repaint is quick, but remotely it will be seconds between when the
autopostback and re-render (your focus restore) happens.

you should switch to an ajax solution, or design to not use an autopostback.

-- bruce (sqlwork.com)



Mufasa wrote:
> Is there a way to tell what the last field was that had focus? Specifically
> I want to have it so that when a person clicks off of a field with
> autopostback=true, I want to know the field they went to and set the focus
> for that when the page reloads.
>
> TIA - J.
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
In a sub-form : when entering a field, verify if another field is true, if so show a MsgBox + set focus on another field Céline Brien Microsoft Access Forms 4 14th May 2008 03:30 PM
Memo Field in Access 2007 - On Lose Focus, Field Jumps To Top Bain Davis Microsoft Access Database Table Design 1 12th Apr 2008 03:25 PM
Problems setting focus on a field, locked into field... =?Utf-8?B?YWVtQW5keQ==?= Microsoft Access Form Coding 2 9th Feb 2006 07:47 PM
set focus for field just losing focus AngiW Microsoft Access VBA Modules 3 3rd Feb 2004 06:07 AM
set focus on next tab when last field loses focus mcnewsxp Microsoft Access Form Coding 4 17th Dec 2003 02:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:34 PM.