I am trying to write a script, that automatically fills two input fields of another website. I looked at the website an saw, that the two input fields have the name 'userid' and 'userpass'. I also wrote this very simple little piece of code to make it more understandable. (Lets say http://www.w3schools.com has two input fields with the names 'userid' and 'userpass')
<input type="button" value="Username" onClick="Start()" />
<input type="text" id="username" value="Username"/>
<input type="text" id="password "value="Password"/>
<script language="JavaScript">
function Start()
{
var username = document.getElementById("username").value;
var password = document.getElementById("password").value;;
window.open("http://www.w3schools.com");
}
</script>
How can I pass the two variables and fill the value of them to the two input fields? Is there any possible way?
Thank you