Re: Form Submit button trigger programmatically?
Posted: Wed Nov 09, 2011 4:29 pm
Hi again Scott, I think this is what you need, you will need to change the "webpage.html" to whatever your netburner page that is going to recive the post is called. I dont think you need the value input to the submitchange routine.
Is the webpage you are going to submit the data to the same webpage that output the form ? , if it is then you can use Ajax or similar type functions to submit the changes and display new/changed data to the page witout a page refresh, it looks a lot neater. Its not hard to do, let me know if you need some guidance, I have some code that does exactly this.
Bill
Code: Select all
<SCRIPT TYPE="text/javascript">
<!--
function submitchange()
{
/* What goes here to submit the form using post? */
document.forms["myform"].submit();
<!-- // alert("Test change"); -->
}
//-->
</SCRIPT>
<table>
<form name="myform" action="webpage.html" method="post">
<tr>
<td width=40> </td>
<td>Enter data to post: <input type="text" name="textForm1" onChange="submitchange()" value="<!--FUNCTIONCALL WebTextForm1 -->"></td>
<td><input type="submit" value="Submit"></td>
</tr>
</form>
</table>
Bill