Hello, guys! I'm newbie in javascript and i would like to make a simple script that inserts a single word in the google's search field. To start, i made a simple html page as you can see below.
Code:
<html>
<head>
<title>Page 2</title>
</head>
<body>

<form name="robgeek">
	Username: <input type="text" name="username"/>
	Password: <input type="password" name="password"/>
	<input type="submit" value="Submit!">
</form>

<script type="text/javascript">

	//Here i can access the robgeek form and manipulate "username", "password" and "submit".
	document.write(document.robgeek.username.name);

</script>
</body>
</html>
Considering this simple webpage as if were google: How can i make a javascript to access those fields, like "Username" and "Password"? I believe i could do the same thing with Google or really make a javascript to access for me my email.
I know how to get access in those fields but only in the same code, like you can see above. But i don't know how to get access and fill those field with a script only for this task. The following code is what i did. I considered the webpage above as a website, and i tried to get access with my following javascript. But i don't know what to do now!
Could you guys help me?
Code:
<html>
<head> 
</head>
<body>

	<a href="#" onclick="window.open('file:///home/rob/index2.html');">Link here!</a>

<script type="text/javascript">
	//I don't know what to put here!
</script>

</body>
</html>
Thank you!