Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Child window property window.opener null after postback

Reply
Thread Tools

Child window property window.opener null after postback

 
 
MrFez
Guest
Posts: n/a
 
      04-27-2005
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?

 
Reply With Quote
 
 
 
 
Yunus Emre ALP÷ZEN [MCP]
Guest
Posts: n/a
 
      04-28-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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?
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Child window property window.opener null after postback =?Utf-8?B?TXJGZXo=?= ASP .Net 1 04-28-2005 06:28 PM
Results from child window submit into parent window, then child closes -- How To? Spammay Blockay Javascript 1 02-04-2005 12:47 PM
Solution: Raising an Event Handler Postback on Parent Window From Popup Child Window Dialog Box Earl Teigrob ASP .Net 1 06-16-2004 04:19 PM
[HELP] Why the child window reopen a new child window ? bhchng ASP .Net 0 01-13-2004 07:17 AM
How do I: Main thread spawn child threads, which child processes...control those child processes? Jeff Rodriguez C Programming 23 12-09-2003 11:06 PM



Advertisments