Ultimate Web Site Drop Down Menu Forum

Ultimate Web Site Drop Down Menu Forum (http://www.udm4.com/forum/index.php)
-   Javascript (http://www.udm4.com/forum/forumdisplay.php?f=9)
-   -   Set focus on a html button when page loads (http://www.udm4.com/forum/showthread.php?t=6236)

01-08-2009 05:53 PM

Set focus on a html button when page loads
 
Hi,

Can anyone help out , on how to make a button [as, input type="button"] default selected/focussed , in a page.

The idea behind this is that I want to use 'enter' to fire the button's click event

Any help , highly appreciated.

Yua

vinyl-junkie 01-09-2009 02:22 AM

You can use the tabindex attribute to set focus on your button, or any other element in your page. This website has a discussion on the subject.

Hope it helps.

jams002 01-09-2009 06:22 AM

what do you mean of focus on a html button??





___________________
Great thing to know about seo test.

vinyl-junkie 01-09-2009 12:24 PM

Sorry, I didn't explain myself very well. If you set focus on the button the way I described, then hitting the Enter key will work the same as if you clicked on the button.

maigan 01-13-2009 09:42 AM

I think you should have to learn from w3school.com for sort out your problem...its really useful for you...go ahead good luck


All times are GMT. The time now is 05:09 AM.

Powered by vBulletin® Version 3.0.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.