Thanks for looking at this for me. I expect I am overlooking something, but
I can't imagine what. It seems simple, but I can't think of anything else
to try.
I simplified it by creating a frameset with one frame containing a page.
The frameset uses RegisterStartupScript to insert javascript, but the
javascript doesn't get inserted.
The page which is the source of the frame uses identical code with
RegisterStartupScript to insert javascript which does work.
I also included some javascript hard coded in the frameset to verify that
javascript works in the frameset, and it does.
Thanks
Bill
----------------------------------
Here is the frameset page design - just a frameset with one frame. There is
a bit of javascript to verify that javascript works.
----------------------------------
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Frameset1.aspx.vb"
Inherits="testing_Frameset1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script language=javascript>
//this works
alert('Test Frameset 1');
</script>
</head>
<FRAMESET id=testFS cols=100% frameBorder=0 frameSpacing=0 >
<FRAME name=testFr1 id=testFr1 noResize src="Frameset1Frame1.aspx"
scrolling=no>
</FRAMESET>
</html>
----------------------------------
Here is the Code Behind of the frameset page:
----------------------------------
Partial Class testing_Frameset1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
'This javascript doesn't get inserted
Dim sScript As String = "alert('test Frameset Startup Script');"
Dim csm As ClientScriptManager = Page.ClientScript
sScript = "<script language=javascript>" + sScript + "</script>"
csm.RegisterStartupScript(Me.GetType, "testFS", sScript)
End Sub
End Class
----------------------------------
Here is the Code Behind of the source page for a frame:
----------------------------------
Partial Class testing_Frameset1Frame1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
'This javascript gets inserted and works
Dim sScript As String = "alert('test Frame');"
Dim csm As ClientScriptManager = Page.ClientScript 'Me.ClientScript
'
sScript = "<script language=javascript>" + sScript + "</script>"
csm.RegisterStartupScript(Me.GetType, "testFrame", sScript)
End Sub
End Class
- Show quoted text -