Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 tab index

Author  Topic 

jhermiz

3564 Posts

Posted - 2004-10-22 : 11:17:16
I have an image button at the top corner of my header user control that seems to always have the tab index on. When i enter data in a field and hit enter it always "clicks" this logout image button because it has some sort of focus to it. Is it possible to not be able to tab over this image button? Like the only way would be to click it rather than hitting enter and being logged out :(

MichaelP
Jedi Yak

2489 Posts

Posted - 2004-10-22 : 12:44:50
I think there's some javascript that you could use to re-set which button has focus. That plus some RegisterStartUpScript() magic should do the trick. I've never done it, so I don't have samples for ya this time man.

Sorry!
Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-10-23 : 00:08:41
Using TabIndex=-1 should cause it to be last in the Tab Index - after everything else. You could then explicitly set something more appropriate to be the thing tabbed to after the field that you are on. However, pressing ENTER in a form is an ar$e anyway. MS IE and AllTheOthers have different ways of tackling this. A form with a single field is supposed to POST when Enter is pressed, but multi-field forms not, but I think that IE posts anyway. I forget the exact details except that I remember it being an PITA when we had to try to work around it

Kristen
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-10-23 : 00:19:50
quote:

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/tabindex.asp

Objects with a negative tabIndex are omitted from the tabbing order



Corey
Go to Top of Page
   

- Advertisement -