HTML and CSS Reference
In-Depth Information
Figure 5.6: a tabbed content section created with html, CSS, and JavaScript
opening neW WinDoWS
When a visitor clicks a link in a page, she expects to go to a new page, which
will replace the current page in her browser's current window. However, some-
times we want to break away from the common expectation and open a new
window on the subject. he most common case is having links to external sites
open in new windows as opposed to the baseline behavior for in-site links.
Another case is providing help information on instructional pages, where just
enough help is provided in a pop-up window, along with links to other docu-
mentation and resources.
For a broad deinition, consider a window to be any rectangular screen
object that has a title bar and content area. Most windows have other optional
properties in common that can be enabled or disabled by both the developer
and site visitor. hese include the ability to be resized, whether the window
can be dragged to other screen locations, and whether scrollbars are enabled.
he most trivial window, therefore, is the browser's Alert window, since all it
does is present a message along with an OK button to acknowledge that you
have seen it. he following code sets an array, message , with messages that are
displayed in an alert box when various links are clicked:
<script type="text/javascript">
messages = [
 
 
Search WWH ::




Custom Search