Html page onLoad calling javascript without submit button -
i trying load html page results of "get" link.the idea when open page, should see results of displayed. tried following javascript no success. problem submit button on page. want submit "pre" done! please help. here have:
<body onload ="subme()"> <script> function subme(){ document.getelementbyid("formbutton").submit(); } </script> <div align="center"> <div style="display: hidden;"> <form action="http://localhost:8000/getusers/" method="get"> <input type="submit" id="formbutton" /> </form> </div> .. </body>
any idea? linked previous post:cgi c program return value main html , display result
the problem submitting button, not form.
try:
function subme() { document.getelementsbytagname('form')[0].submit(); }
since have no need submit button, there no harm in removing html.
Comments
Post a Comment