Updating more than one frame from a Web request |
Dynamic Web requests can only serve a single frame target at a time. To direct output to a specific frame you can use the TARGET attribute of the HREF and FORM tags. Note that you cannot redirect to a specific frame since a redirect does not allow specifying of a target tag. The target tag solves accessing a specific frame, but you can't use it to update two frames at ones.
Or can you?
With the help of a little JavaScript in the generated HTML you can cause one page to load another page when it loads. In the example above the detail page loads, and the JavaScript code in the form's load event then updates the other frame by running another request from the server. Here's what the code looks like:
<script language='JavaScript'>
<!-- //
if (window.name == 'Detail')
// dynamic Web request to update the toolbar
parent.Toolbar.location='wc.wwt?wwThreads~updatetoolbar';
// -->
</script>
The syntax is:
parent.Toolbar.location='wc.wwt?wwThreads~updatetoolbar';
where parent is the current window's (Detail) parent - ie. the main Web Browser frame, and Toolbar is the frame that is to be updated. Changing the location property causes the browser to navigate to that page in the Toolbar frame. Note that these names are case sensitive and must match your frame names exactly. Otherwise you'll get a script error.
Last Updated: 03/23/99