I am using frames for my web application. Description (1)Left Frame with a list of buttons (clicking them opens a web page in the right frame) (2)Right Frame, opens the web page passed by the left frame.
Problem: Button click works perfectly in Internet Explorer 8.0 on production machine, Windows XP, 32 bit.
Button click event doesn't open anything in the right frame, just remains as it is, in Firefox, Chrome, Internet Explorer 9.0
Intial code that loads the frames
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="frmMain.aspx.vb" Inherits="XYZ" smartNavigation="True"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<TITLE>frmMain</</TITLE>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<frameset COLS="20%,80%">
<frame name="frame1" src="frmbuttons.aspx">
<frame name="frame2" src="frmbegin.aspx">
</frameset>
Example code (for a button in left frame):
Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click
Dim url As String = String.Empty
url = "test.aspx"
Dim frameScript As String = "<script language='javascript'>" & "window.parent.frames(1).location='" & url & "';</script>"
ScriptManager.RegisterStartupScript(Me.Page, Me.Page.GetType, "FrameScript", frameScript, False)
end sub
Any help will be appreciated.