First Selected Button
-
Hi, I have a form with the following format: a the the top there are two buttons, followed by a text field, followed by a submit button. When I load the page, and press enter, nothing happens. When i select the text box and type stuff and press enter, the first button gets selected. The problem is this is a logout button. By default I want the submit button to be selected. I tried tabindex=1 on it but that didnt work. Any ideas? Thanks in advance,
-
Hi, I have a form with the following format: a the the top there are two buttons, followed by a text field, followed by a submit button. When I load the page, and press enter, nothing happens. When i select the text box and type stuff and press enter, the first button gets selected. The problem is this is a logout button. By default I want the submit button to be selected. I tried tabindex=1 on it but that didnt work. Any ideas? Thanks in advance,
Hi there, use js code to set focus to the control at page load.... just simply put this js code:
getElementbyId("your_button_id").focus()
intoonload
event in body tag of the form << >> -
Hi there, use js code to set focus to the control at page load.... just simply put this js code:
getElementbyId("your_button_id").focus()
intoonload
event in body tag of the form << >>Nice one bruvver