Submit File Known To Author

[Total: 0    Average: 0/5]

This shows how to have a form that is hidden and have a submit via another form button, or a HREF.

Body Code:

<style type=text/css>
#hideform {position:absolute;visibility:hidden;}
</style>
<div id=hideform>
<form name=exf1 enctype="multipart/form-data" method=post>
<input type="file" name="name" value="yourfilename" size=30>
</form>
</div>
<script type=text/javascript>
function doIt() {
  document.forms["exf1"].action="some_cgi_program.cgi";
  document.forms["exf1"].submit();
}
</script>

<BR><a href="javascript:doIt()">Submit File</a>
<BR><form>
<input type=button value="Submit A File" onclick="doIt()">
</form>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *