Not sure if I can do this but I'm reading through JavaScript: The Definitive Guide, and I'm going to be posting practice scripts that work. They may not make sense, but they work.
I'd also like responses on how these simple snippets could be used and how they can be made better.
Opening a Window
This is just a simple form with an input box and a "Go" Button. You type in the URL that you want loaded into the new window. Click Go and a new Window Object is created and new window opened. I think.
HTML
<form name="frm">
<input name="website" type="text" size="40" maxlength="80" value="type url">
<input name="openpage" type="button" value="Go" onClick="goToPage()">
</form>
JavaScript
function goToPage() {
var siteForm = document.getElementsByName("frm")[0];
var webpage = siteForm.website.value;
window.open(webpage);
/* Works! */
};