I have a form with few text inputs. Every text input is followed by image type
input. In this form I want to have 1 submit button on the top. A problem I want
to resolve is: when user type something into text input and press enter then I
want to submit form by image type button but not by submit button. I tried to
use tabindex parameter but this not work as I expect.
Any idea?
Code example:
------------------------------------------------------------------------------------------
<form name="test" action="index.php" method="post">
<input type="submit" name="ok" value="Accept" tabindex=100>
<span>Item 1
<input type="text" name="i1" tabindex=1>
<input type="image" src="basket.gif" name="add1" tabindex=2>
</span>
<span>Item 2
<input type="text" name="i2" tabindex=3>
<input type="image" src="basket.gif" name="add2" tabindex=4>
</span>
<span>Item 3
<input type="text" name="i3" tabindex=5>
<input type="image" src="basket.gif" name="add3" tabindex=6>
</span>
</form>
------------------------------------------------------------------------------------------
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail.
Send me your mail from another non-spammer site please.)
Please reply to <petr AT practisoft DOT cz>