frame problems when page display takes awhile

Mike Smith

New Member
Hi All!

Environment: IIS/WS3.1d/IE

I've got a page that works great sometimes.

The page has two frames, pageHead and pageDet. The header prompts the user for a customer and site then displays the site address and a "toolbar" of report choices the user can run for that customer/site. The tool bar is just a series of <input type="image" ...> entries inside of a table. Depending upon which image the user clicks on, a report runs and the output is displayed in the pageDet frame. Also the pageHead frame is refreshed so that the image of the selected report changes to indicate which report is active.

I've been using javascript to control the pageDet frame. Specifically:

function newSrc(vUrl) {

parent.pageDet.document.location.href=vUrl;
parent.pageDet.document.submit();

}

This function is fired on the onclick event of the image input tag.

This normally does everything I want, the report runs and the image changes. If the user selects a different customer or site then the header page redisplays with the new data and the detail page resets to the default message ("Please select an report").

The problem is that if the report returns a lot of data I will get something like:

Set-Cookie: SERVER_CONNECTION_ID= ......; Path=/scripts/WService=......

in the pageHead frame and the report output in the pageDet frame.

If I refresh the pageHead frame then I get my correct header information.

This seems to happen anytime a report takes more than 10 seconds to return the data so I assume that there is some timeout involved though I'm not sure what. Also, I use other reports elsewhere in the site (no frames) that use the same underlying queries and they work fine, even when they take 2-3 minutes to return data.

Anyone have any ideas as what is going on and how to resolve it.

Also, I'm open to any alternatives to frames as long as I can dynamically (from a DB table) create the "toolbar" and output the report data for whatever report the user chose.

TIA,

Mike Smith
 
update to "frame problems when page display takes awhile"

While I haven't figured out the original problem, I have found a solution that seems to work better overall.

The page was originally developed using <input type=image ....> tags to simulate button presses using custom images. The reason for using "input" was to identify which "button" was pressed so that we could make appropriate display changes in the header frame.

After reviewing the problem, I figured out that I could use <a href= .... ><img src=....> tags to accomplish the button simulation and I could call a javascript function with the "onclick" method of the <a> tag to fire the submit of the header frame.

So now the header displays the "toolbar" and each "button" is a hyperlink with the button graphics being clickable. When the user presses the "button" the destination page is displayed in the detail frame and a javascript function fires that sets a hidden field in the header frame with the id of the button that was pressed. The function then fires the submit() function of the header frame which causes the header to refresh and change the button graphic of the pressed button.

The header frame now updates and displays almost instantly and the detail frame displays reasonably even with a large dataset being returned.

The one extra thing I had to do was to add an "onclick" action on the real submit button from the header page so that when the user changes the customer or site fields (changes the parameters) then the detail screen gets reset to a default screen instead of the last data displayed.

All in all a decent solution. Though I would still like to know what the timing problem was originally.

Mike Smith
 
Back
Top