Can you provide a little more context? For example, where and how is a function defined submit? With the help of just described above, it should work - with the exception of:
You might also want return false;to undo the default action. For instance:.
<a href="javascript:void(0);" onclick="submit();return false;">Sign In</a>
Perhaps the default action occurs immediately after submitand intervenes in it.
. submit. IE . - id name, "", , ...