Published in: JavaScript
URL: http://www.codingforums.com/archive/index.php?t-45202.html
<html> </head> <script language="Javascript"> function disableAfterSubmit(object) { //object.outerHTML = object.innerHTML; //alert(object.href); document.forms[0].textField.value = document.forms[0].textField.value + "1" ; // to check that this is working fine, just comment line below and the page won't redirect to anywhere, but this function won't be entered again. // (you can see that it is true because no more "1" are added to the textField in the form) document.forms[0].submit(); } </script> </head> <body> <form name="listForm" action="http://www.google.com/gwt/secondPage.htm"> <input type="text" name="textField"> <a href="javascript:disableAfterSubmit(this);" onclick="this.onclick=function(){return false;}">Link - Submit</a> </form> </body> </html>
You need to login to post a comment.
