PDA

View Full Version : Http submit?


mrdude
03-18-2009, 09:17 PM
Hi just now I have a http web page with the following code:


<html>
<head>
<script language="javascript">
<!--
function reset_modem() {
reset_form.submit();
}
-->
</script>
</head>
<body onload="reset_modem()">
<form name="reset_form" id="reset_form" method="post" action="http://192.168.100.1/configdata.html">
<input type="show" name="BUTTON_INPUT" value="Restart Cable Modem">
</form>
</body>
</html>


How would I use the http submit function to make a button do the same thing without needing to load this http page into a web object?

Can it be done - or does the http submit only work with php pages?

Thanks.

reteset
03-19-2009, 11:47 AM
maybe this may work

myvalues = {BUTTON_INPUT="Restart Cable Modem"};
result = HTTP.Submit("http://192.168.100.1/configdata.html", myvalues, SUBMITWEB_POST, 20, 80, nil, nil);

mrdude
03-19-2009, 12:46 PM
maybe this may work

myvalues = {BUTTON_INPUT="Restart Cable Modem"};
result = HTTP.Submit("http://192.168.100.1/configdata.html", myvalues, SUBMITWEB_POST, 20, 80, nil, nil);

No the myvalues - is just the name that's on the button when the page is loaded into a web browser

Ulrich
03-19-2009, 02:30 PM
Hi,

you use HTTP.Submit() to send data to a program, where the data will be processed and serve for some purpose. A HTTP form can be built using CGI (like a Perl script, for example), ASP, PHP, etc. - but a plain HTML page will most likely not do anything (unless you just want to run some Javascript).

If you are just trying to reload the page in the web object with a click on an external button, there are other means to achieve this.

Ulrich

mrdude
03-19-2009, 03:40 PM
Hi,

If you are just trying to reload the page in the web object with a click on an external button, there are other means to achieve this.

Ulrich


That page sends a command to a modem to make the modem reboot itself m8, & yes it does run a java script. I am not trying to reload a page - lol.

Basically all I want is to understand how to use the http submit to send data to a web page (html) so I can use it in other projects.