HuyPV
Wednesday, September 16, 2009
Not working:
<a href="javascript:;" onclick="document.frmMain.submit();" class="button">Submit</a>
Solved:
<a href="javascript:;" onclick="document.frmMain.submit();return false;" class="button">Submit</a>
You can custom like following solution:
Create file lib.js
function submitForm(formId) {
document.getElementById(formId).submit();
return false;
}
In html page
<script type="text/javascript" src="lib.js"></script>
...
<a href="javascript:;" onclick="return submitForm('frmMain');" class="button">Submit</a>
Title:
href onclick submit form IE 6
Description:
Not working: <a href="javascript:;" onclick="document.frmMain.submit();" class="button">Submit</a>...
...
Rating:
4