Hi,
You will not get any exception, the browser does not throw exceptions.
do something like:
in the aspx page:
<script<
function RefreshFrame()
{
alert(parent);
alert( parent.menu);
alert( parent.menu.location);
parent.menu.location.reload(true);
}
</script>
<body runat=server id=theBody>
in the .cs:
protected HtmlGenericControl theBody;
theBody.Attributes.Add( "onLoad", "RefreshFrame();");
"Ben" <ben_1_ AT hotmail DOT com> wrote in message
news:73**********************************@microsof t.com...
I have a method that those lines of code are called from.
The code seems to run without throwing any errors, but the frame is not
updated.
Here is the exact code:
private void refreshMenu()
{
string script = "<script>parent.menu.location.reload(true)</script>";
this.Page.RegisterStartupScript("reload", script);
}
Thank you again for any additional help.
Ben
"Ignacio Machin ( .NET/ C# MVP )" wrote:
"Ben" <ben_1_ AT hotmail DOT com> wrote in message
news:C2**********************************@microsof t.com... > Hello
>
> First, I know frames are not exactly the best things to be using in an
> asp
> application
Why is this?
, but I had no other choice. My problem is that I now have > situations where one frame must update another. Is there a way to do
> this?
of course, you have to use jscript and reload the other frame.
> I have tried the following code:
> string script = "javascript:parent.menu.location.reload(true); ";
> this.Page.RegisterStartupScript("reload", script);
>
> but this does not work. Any suggestions?
what error r u getting?
I would change it to
string script = "<script>parent.menu.location.reload(true) </script>"
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation