Back button and Focus

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.
 
C

Cowboy \(Gregory A. Beamer\)

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. :)
 

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,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top