Back button and Focus

  • Thread starter Thread starter dgk
  • Start date Start date
D

dgk

The last thing I do in the page load of a page is to use the focus
method (txtLastName.Focus) and, usually, the focus ends up on that
textbox. It's a bit easier than using the javascript though I assume
it does the same thing.

The oddity is that, if folks use a button on another page that
executes a response.redirect to the first page, the focus continues to
work correctly. If they use the back button, it doesn't. I'm sort of
surprised because the txtLastName.Focus code gets hit either way.

It isn't a major problem but I'm curious as to why it is (not)
happening.
 
With back, they are most likely pulling a locally cached copy with the
pointer to the last place they had focus. Oh, the wonders of the web. :-)

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
 
Back
Top