background
|
|
Linux
Linux Support
A small area on the internet for Linux Support.
More icon

Tombstone
Tombstone Tuning
Home of tuning, projects and fast cars and boats.
More icon
|
|
Up Image
Navigation
Search this Site
Enter your search terms

Site Breadcrumb - You are here
|
Thau's JavaScript Tutorial
Lesson 3

by Thau!

Page 2 — Introduction to Window Manipulation

Before learning how to open a window in JavaScript, you should know how to open one using HTML. In most recent browsers, you can open a new window using an href statement. For example, clicking on this link will open another window.

The HTML used to do this is:

clicking on <a
href="yer_new_window.html" target="yer_new_window">this
link</a> will open another window.

The important thing to know about windows opened by targeted links is that the window above now has the name "yer_new_window" associated with it. If you have another href that uses "yer_new_window" as the target, and you haven't closed the window yet, whatever URL you put in that link will open in the original window. If you want to see what I mean, click here and then open another HTML page in the same window.

For the purposes of this lesson, I'm going to call the target name, in this case yer_new_window, the name of the window.

Now that we've had this brief refresher on href targets, it's time to learn about opening windows in JavaScript.

next page»