Following is a sample code of which I’m working of. When navigating through ENTER button form submit invokes “Cancel” action though it’s tab index is after the “Next” button.
E.g.
Field01 <ENTER> Field02 <ENTER> Field03 <ENTER> >>>>> Form submits with Cancel action
Field01 <TAB> Field02 <TAB> Field03 <TAB> >>>>> Next button is focused
Changing the order of “submit” buttons in HTML mark-up would help to prevent the invocation of “Cancel” button by default. But I need to keep “Cancel” button in left side & “Next” button in right side.
<form method="post" action="/SVRWeb/ActionController" name="frmMain">
<div>
<h1>Some information</h1>
<label>Field 01</label>
<input type="text" tabindex="0" name="field01" value"" size="15" />
<label>Field 02</label>
<input type="text" tabindex="1" name="field02" value"" size="15" />
<label>Field 03</label>
<input type="text" tabindex="2" name="field03" value"" size="15" />
</div>
<input type="submit" tabindex="4" name="Action.User.Init" value="Cancel" />
<input type="submit" tabindex="3" name="Action.User.Form2" value="Next"/>
</form>