You actually don't even need JavaScript at all for this. All you need is an HTML form that submits using the
GET method. This will take all of the form fields, create a URL query string out of them, and append them to the form's
action as the request.
Try this:
Code:
<form action="chat2.cgi" method="GET">
<input type="hidden" name="action" value="send_pwd" />
Enter Username: <input type="text" name="username" />
<input type="submit" value="Retrieve Password" />
</form>
When that form is submitted, the request will look like this:
chat2.cgi?action=send_pwd&username=whateverWasEntered
Try that and let me know how it goes.
-Greg