Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Tab on image button

Status
Not open for further replies.

paragvshah

Programmer
Joined
Jan 11, 2001
Messages
109
Location
IN
Hi Friends,

In a html page there are some text fields and checkboxes but instead of normal button i have given input type as image and src for that image. But i am not being able to set tab on that image button as well as i when i hit enter key from keyboard it is not submitting the form. Can anybody let me a solution for this.

Parag.
 
It may be because you are not specifically assigning tabindex property to all other inputs on the page, the following works because tabindex is put on all input elements:

<form name=what method=post>
<input type=text name=t1 tabindex=1>
<input type=text name=t2 tabindex=3>
<input type=text name=t3 tabindex=4>
<input type=text name=t4 tabindex=5>
<input type=text name=t5 tabindex=6>
<input type='image' src='whatever.gif' tabindex=2>
<input type=text name=t6 tabindex=7>
</form>

The reason your form may not be submitting when you press enter key is because you have more than 1 form on the page.


 
Thanks,

It worked out.


Parag.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top