Need Javascript Code That Will Open A Webpage Then Fill Out The Form And Submit
<p>Just as the title says, I need help with javascript code that will open a webpage and fill out the form then submit the information.</p>

<p>Here is what I have currently:</p>

<pre><code>var firstName = 'Billy';
var lastName = 'Bob';
var loginWindow = window.open('my website', 'loginWindow');
loginWindow.document.getElementById('fname').value=firstName;
loginWindow.document.getElementById('lname').value=lastName;
loginWindow.document.form.submit();
</code></pre>

<p>(I found it on another post).. but it does not work for me.</p>
