Is using the onclick="this.form.submit();" method of form submission restricted to use only on other <input /> tags?
Is there a way to use this method on an <a> tag?
I'm trying to achieve something like this, but it's not working:
I'm trying to find the least 'hardwired' manner of doing this, because yes, I am aware of:Code:<form action="serverFile.php" method="post"> <!-- various input controls --> <a onclick="this.form.submit();">Send</a> </form>
And I am trying not to use this if possible.Code:<form name="myForm" action="serverFile.php" method="post"> <!-- various input controls --> <a href="javascript:document.myForm.submit();">Send</a> </form>




Reply With Quote