JavaScript Frames: Target Practice Target is used to indicate where the hyperlink will be displayed in reference to the current window or frame. This could be the same window, a new window, or one of the frames on a multi-frame display. Here are two examples:
<a href="something.html" target="content"> – displays hyperlink in frame named "content"
_parent (updates parent frame if this is a child, otherwise updates itself) _self (updates frame containing the hyperlink) _blank (displays in new, unnamed window) xxx (displays in the frame named "xxx") If there is no "target" identified in the tag, then the hyperlink displays in the current window. As different pages are displayed in the content area, you want different messages to appear. The following code, placed in the content area, would cause the file "hello.htm" to display in the welcome message area:
if (window.top.frames.length>0){window.top.frames[1].location="hello.htm"} </script>
|