Updating more than one frame from a Web request


I have an application that consists of three frames. One's a navigation frame and the second is the detail frame and the third is a toolbar that needs to get updated based of what goes into the detail frame. How can I do this

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>

put this code following the <BODY> tag of the HTML document to have it fire when the page loads.

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