Set focus next element after form submit

Set focus next element after form submit

Hi all, I want to set focus after submit form, so when i press enter on any textbox form submit and control will move on next element. my code here.

html code: (index.html)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-1.8.2.min.js"></script>
<script src="movenext.js"></script>
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
  <table width="650" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="145" align="right">Date:</td>
      <td width="505"><input class="myClass" name="date" type="text" id="date" size="4" /></td>
    </tr>
    <tr>
      <td align="right">Account:</td>
      <td>
        <select class="myClass" name="select" id="select">
        <option>Account 1</option>
        <option>Account 2</option>
        <option>Account 3</option>
        <option>Account 4</option>
        </select>
      </td>
    </tr>
    <tr>
      <td align="right">Item:</td>
      <td align="left" valign="middle"><select class="myClass" name="select2" id="select2">
      <option>Item 1</option>
        <option>Item 2</option>
        <option>Item 3</option>
        <option>Item 4</option>
      </select>
        Qty:
        <input class="myClass" name="textfield2" type="text" id="textfield2" size="4" />
        Rate:
        <input class="myClass" name="textfield3" type="text" id="textfield3" size="4" />
        Dis:
        <input class="myClass" name="textfield4" type="text" id="textfield4" size="4" />
        Total
        <input class="myClass" name="textfield5" type="text" id="textfield5" size="4" /></td>
    </tr>
  </table>
</form>
</body>
</html>


jQuery code: (movenext.js)
$(document).ready ( function () {  
var index = 0;
$('#date').focus();
$('.myClass').keypress (function (e) {
if (e.which == 13) {
index = $('.myClass').index(this);
// $('form').submit();  this works fine , but when i use this form.submit tag then works not fine
index++;
if (index == 7) {
$('.myClass').eq(2).focus();
} else {
$('.myClass').eq(index).focus();
}
}
});
});