Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 13th, 2007, 02:35 AM
Registered User
 
Join Date: Aug 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Popup cannot write int parentwindow textbox

Hi experts

I got a popup in which the user can enter some data. After clicking a submit-button in the popup the popup is closed and the data is written in textboxes in the parentpage.

First off, it all worked fine in .Net 1.1 but since migration to 2.0 it does not anymore :-(

The reason is this: The textboxes on the parentpage are readonly. If I make them writable all works fine, but that's not how it is supposed to be.

The Javascript which is fired when the user clicks the submit-button on the popup writes the data to the textboxes and enforces a postback:

Code:
string script = String.Concat( "<script>",                           
"window.opener.document.forms[0].", this.textBox1_ClientID.Text, ".value = '", value1, "';",
"window.opener.document.forms[0].", this.textbox2_ClientID.Text, ".value = '", value2, "';",
"window.opener.document.forms[0].submit();\n",  
"self.close();",
"</script>");
The data is actually written to the textboxes (I can see the changed value), but after the postback the old values are back in the textboxes.

Why does this problem appear and how can I solve it?

I tried to replace the textboxes with labels. The labels are rendered as <span> tags. I was not successfull in setting the value or innerTag for the span.

I am running out of ideas, unfortunately storing the data in a session is not a option.

Your help is much appreciated!
JJ





Similar Threads
Thread Thread Starter Forum Replies Last Post
VB 6.0, use form to write to excel (textbox) bonkbc Beginning VB 6 2 March 3rd, 2008 11:44 AM
write the values of textbox to a file sandhyamn Pro JSP 1 May 23rd, 2007 10:04 AM
hi help me to write javascript to validate textbox karthikc85 XML 1 October 12th, 2006 03:12 AM
Write XML element into textbox with XSLT tcstom XSLT 4 July 5th, 2006 04:08 AM
How to write value of checked list in textbox gilgalbiblewheel Classic ASP Databases 2 August 10th, 2005 06:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.