i am struggling with how to issue a submit,method=post type
command WITHOUT a button. I can't seem to get an onload
type invocation.
If i place a button on the form and press it, the servlet is
called correctly.
If i try an onLoad call it does not work.
What would someone do....would you create a hidden button
and then issue a onClick...how is a network command
issued WITHOUT the use of buttons?
sample code:
<script language="javascript">
function postinterfaces(form)
{
// this works when pressing button. form.submit()
alert("help")
form.action="http://machine/servlets/servlet"
form.method="post"
form.elements[0].name="command"
form.elements[0].value="thevalue"
form.submit()
}
function pressButton(form) {
postinterfaces(form)
}
</script>
</HEAD>
<form >
<p><input type="SUBMIT" name="SupList" value="SMUCK" onClick="postinterfaces(this.form)"></p>
</form>
//onload won't work
<body bgcolor="#FFFFBB" onload="pressButton(this.form)">
</body>
</html>
thank you al