Go Back   Ultimate Web Site Drop Down Menu Forum > Web Development > Javascript
Register FAQ Members List Calendar Today's Posts

Reply
Thread Tools Display Modes
Unread 01-08-2009, 05:53 PM
Yua
Posts: n/a
  #1  
Default 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
Reply With Quote
Unread 01-09-2009, 02:22 AM
vinyl-junkie vinyl-junkie is offline
Moderator
Join Date: Aug 2007
Posts: 114
  #2  
Default

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.
Reply With Quote
Unread 01-09-2009, 06:22 AM
jams002 jams002 is offline
Junior Member
Join Date: Jan 2009
Posts: 2
  #3  
Default

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





___________________
Great thing to know about seo test.
Reply With Quote
Unread 01-09-2009, 12:24 PM
vinyl-junkie vinyl-junkie is offline
Moderator
Join Date: Aug 2007
Posts: 114
  #4  
Default

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.
Reply With Quote
Unread 01-13-2009, 09:42 AM
maigan maigan is offline
Junior Member
Join Date: Dec 2008
Posts: 12
  #5  
Default

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



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 10:48 AM.


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