BUG: InfoViewer Becomes Inoperable After Window.Close Is CalledLast reviewed: December 15, 1997Article ID: Q178039 |
The information in this article applies to:
SYMPTOMSInfoViewer ceases to function after browsing a page with client-side script that contains the Window.Close command. Trying to browse other pages with InfoViewer causes a blank error message to appear.
CAUSEInfoViewer is not capable of closing itself from within the Visual Studio shell. The conditions that cause this behavior are:
RESOLUTIONUse Internet Explorer to view the page that calls the "window.close" method.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
SYMPTOMSValues of session variables defined in an Active Server Pages (ASP) page are empty when you attempt to access the values from other ASP pages within the frameset.
CAUSEThe following conditions cause this error to occur:
Active Server Pages keeps track of sessions through the use of cookies. When using a frameset that contains ASP files, the cookies aren't returned to the browser until the entire frameset is loaded. For this reason, if a session hasn't already been established (for example, a SessionID cookie hasn't been passed to the browser), Active Server Pages creates a new session for each ASP file within the frameset. NOTE 1: If the session variable is initialized within the Session_OnStart of the global.asa and the variable increments (for example, a variable that holds a value indicating how many people have hit your site.), the value will increment by an amount equal to the number of frames containing ASP pages you have in your frameset. This behavior is due to the Session_OnStart executing for each ASP file in your frameset.
RESOLUTIONActive Server Pages maintains a session only when necessary (for example, if a session variable is created). To avoid this behavior, you must establish a session before the frameset is processed. In most cases, the easiest way to do this is by changing the file that defines the frameset from an HTML file to an ASP file.
MORE INFORMATION
Steps to Reproduce BehaviorCreate the following files: Main.htm:
<HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Developer Studio"> <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1"> <TITLE>Document Title</TITLE> </HEAD> <BODY> <FRAMESET FRAMEBORDER=0 SCROLLING=YES ROWS="15%, 70%, *"> <FRAME NAME="Top" SCROLLING="NO" SRC="Top.asp"> <FRAME NAME="Middle" SCROLLING="AUTO" SRC="Middle.asp"> <FRAME NAME="Bottom" SCROLLING="NO" SRC="Bottom.asp"> </FRAMESET> </BODY> </HTML>Top.asp:
<%@ LANGUAGE="VBSCRIPT" %> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual InterDev 1.0"> <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1"> <TITLE>Document Title</TITLE> </HEAD> <BODY> <% Response.Write( "Top.asp: " & Session.SessionID ) %> <%'set a session variable I want to be global to all asp files in the frameset session("GlobalVar")="Top"%> </BODY> </HTML>Middle.asp:
<%@ LANGUAGE="VBSCRIPT" %> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual InterDev 1.0"> <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1"> <TITLE>Document Title</TITLE> </HEAD> <BODY> <% Response.Write( "Middle.asp: " & Session.SessionID ) %> <SCRIPT LANGUAGE="VBScript"> Sub CommandButton1_Click() 'display the global variable set in top.asp msgbox "<%=session("GlobalVar")%>" 'if GlobalVar is blank, it means the variable is scoped to a 'different session. end sub </SCRIPT> <OBJECT ID="CommandButton1" WIDTH=96 HEIGHT=32 CLASSID="CLSID:D7053240-CE69-11CD-A777-00DD01143C57"> <PARAM NAME="Caption" VALUE="display gvar"> <PARAM NAME="Size" VALUE="2540;846"> <PARAM NAME="FontCharSet" VALUE="0"> <PARAM NAME="FontPitchAndFamily" VALUE="2"> <PARAM NAME="ParagraphAlign" VALUE="3"> </OBJECT> </BODY> </HTML>Bottom.asp:
<%@ LANGUAGE="VBSCRIPT" %> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual InterDev 1.0"> <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1"> <TITLE>Document Title</TITLE> </HEAD> <BODY> <% Response.Write( "Bottom.asp: " & Session.SessionID ) %> <% Session("MyVar") = "Bottom" %> </BODY> </HTML>Browse Main.htm and you will see that the session IDs are all different. Rename Main.htm to Main.asp, and add the following line of code after the </FRAMESET> tag:
<% Session("MyVar") = "Main" %>Note that only one session is created and is maintained until the session ends. Keywords : VIMisc Technology : kbInetDev kbinetdev Version : WINDOWS:1.0 Platform : WINDOWS Issue type : kbbug |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |