FIX: Navigating to Frame with Web Page Starts New Instance of IEID: Q195556
|
If you have a page with frames, using Hyperlink.NavigateTo to navigate to a UserDocument in a frame that contains an HTML page causes the UserDocument to be opened in a new instance of Internet Explorer.
Set the SRC property of the frame element directly instead of using Hyperlink.NavigateTo.
Microsoft has confirmed this to be a bug in Microsoft Internet Explorer (Programming) versions 4.0, 4.01, 4.01 SP1. This bug was corrected in Microsoft Internet Explorer 5.
<HTML>
<FRAMESET cols="50,*>
<FRAME SRC="UserDocument1.vbd">
<FRAME NAME="RightFrame" SRC="UserDocument2.vbd">
</FRAMESET>
</HTML>
Option Explicit
Private Sub cmdAddress_Click()
UserDocument.Hyperlink.NavigateTo txtAddress.Text, , "RightFrame"
End Sub
Private Sub cmdVBD_Click()
UserDocument.Hyperlink.NavigateTo "UserDocument2.vbd", , "RightFrame"
End Sub
Option Explicit
Private Sub cmdAddress_Click()
NavigateInFrame txtURL.Text
End Sub
Private Sub cmdVBD_Click()
NavigateInFrame "UserDocument2.vbd"
End Sub
Private Sub NavigateInFrame(strURL As String)
' Get a reference to the window that is hosting the frameset
Dim win As HTMLWindow2
Set win = Parent.Parent.parentWindow
' Get the document associated with the window
Dim doc As HTMLDocument
Set doc = win.document
' Get the frame element for "RightFrame" from the all collection
Dim frmElem As HTMLFrameElement
Set frmElem = doc.All("RightFrame")
frmElem.src = strFilename
Additional query words:
Keywords : kbIE400bug kbIE401bug kbIE401sp1bug kbIE500fix
Version :
Platform :
Issue type : kbbug
Last Reviewed: April 8, 1999