Hi!
I've been struggling with trying to submit a form on a page on my localhost to another website. This is the form code on the site I want to login to:
<form name="login_ams_form" id="login_ams_form" method="post">
<input type="text" name="username" id="login_username">
<input type="password" name="password" id="login_password">
<input type="text" name="company" id="login_company">
<div align="right" style="margin-removed22px">
<div style="float:right; margin-removed5px">
<a >Reset</a>
</div>
<div style="float:right" id="login_button">
<a >Login</a>
</div>
<div style="float:right; display:none; margin-removed10px; margin-removed10px" id="login_loading">
<img src="img/loading.gif" width="32" height="32">
</div>
<div class="clearfix"></div>
</div>
</form>
I see that the submit action checks a function on a javascript file. So i'm trying to reference that js file in my own html file which i want to use to login.
This is what i've tried so far:
<html>
<head><script src="http://www.thedomain.co.za/js/functions.js"></script> </head>
<h3>Login to AMS</h3>
<form action="http://www.thedomain.co.za/index.html" "name="login_ams_form" id="login_ams_form" method="POST">
<input type="text" name="username" id="login_username" />
<input type="password" name="password" id="login_password" />
<input type="text" name="company" id="login_company" />
<input type="submit" onClick="checkLoginams()" >
</form>
</html>
My code is being stripped when i post it here, but the login button has an onclick javascript function called checkloginams
When I do this I get the following error : "405 - HTTP verb used to access this page is not allowed."
What am I doing wrong? I had previously tried using cURL to login, which worked but I couldn't login through cURL and then open the actual external site I logged into so I reverted back to trying this. Any assistance would be greatly appreciated! :)