Ask a Question related to ASP.NET Security, Design and Development.
-
MrFez #1
Child window property window.opener null after postback
I have an webform from which I open a child window to display a calendar.
When a date is selected in the calendar window it attempts to set the value
of a textbox in the main (parent) window by using the window.opener property
to reference the textbox.
Everything works fine initially. However if the the main window does a
postback and the calendar is re-opened, its window.opener property will
always be null.
So: BEFORE main window executes a postback the calendar can be opened,
close, and re-opened many times and window.opener is set properly.
AFTER main window does a postback (another button was clicked) the calendar
window can be opened but it cannot return a value because window.opener is
always null.
Note, this seems to be primarily a problem with Windows XP SP2 clients.
Windows Server 2003 SP1 clients do not seem to have this problem.
Any ideas?
MrFez Guest
-
Child Controls => Postback? => null?
Hi there were a few postings earlier, including mine regarding this. It looks as if when a dynamic child control causes a postback, its handler... -
Refreshing or Redirecting Opener Window
Is it possible to redirect or refresh the contents of Page1 from within Page2 where Page2 was opened by Page1? -
RePosting window.opener windows to server.
Hi , I know that this is something belongs to IE but , I think sometimes asp.net developers encounter this problem. Sometimes we need to repost... -
Refresh Parent window from child window causes problems
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence... -
window.opener.location.href doesn't work in frame
From parent windows, I have created a popup windows that comprises two frames. When I have clicked a link button in one of the frames, I would like... -
Yunus Emre ALPÖZEN [MCP] #2
Re: Child window property window.opener null after postback
Hi,
I think problem is caused by another reason. For example test the case given
below. This should always work. it is not important ASP.NET/html. Because in
your case always client side is executed.
"opener.html"
<html>
<head>
</head>
<body>
<a href="#" onclick="javascript:window.open('child.html')"> child </a><br>
<a href="http://www.msakademik.net" >MSAkademik.NET</a>
</body>
</html>
"child.html"
<html>
<head>
</head>
<body>
<a href="javascript:test()"> MSAkademik.NET</a>
</body>
</html>
<script language="javascript">
function test()
{
alert(window.opener)
}
</script>
"MrFez" <MrFez@discussions.microsoft.com> wrote in message
news:22551215-F170-4F94-9281-E2C23D287C02@microsoft.com...>I have an webform from which I open a child window to display a calendar.
> When a date is selected in the calendar window it attempts to set the
> value
> of a textbox in the main (parent) window by using the window.opener
> property
> to reference the textbox.
>
> Everything works fine initially. However if the the main window does a
> postback and the calendar is re-opened, its window.opener property will
> always be null.
>
> So: BEFORE main window executes a postback the calendar can be opened,
> close, and re-opened many times and window.opener is set properly.
>
> AFTER main window does a postback (another button was clicked) the
> calendar
> window can be opened but it cannot return a value because window.opener is
> always null.
>
> Note, this seems to be primarily a problem with Windows XP SP2 clients.
> Windows Server 2003 SP1 clients do not seem to have this problem.
>
> Any ideas?
>
Yunus Emre ALPÖZEN [MCP] Guest



Reply With Quote

