views:

1042

answers:

3

I have an asp.net web page written in C#. Using some javascript I popup another .aspx page which has a few controls that are filled in and from which I create a small snippet of text. When the user clicks OK on that dialog box I want to insert that piece of text into a textbox on the page that initial "popped up" the dialog/popup page. I'm guessing that this will involve javascript which is not a strong point of mine.

How do I do this?

+2  A: 

What you could do is create an ajax modal pop-up instead of a new window. The semantic and aesthetic value is greater not to mention the data-passing is much easier.

http://www.asp.net/ajax/ajaxcontroltoolkit/samples/modalpopup/modalpopup.aspx

Cptcecil
+6  A: 

You will have to do something like:

parent.opener.document.getElemenyById('ParentTextBox').value = "New Text";
GateKiller
A: 

@Cptcecil - I would like to do that but this particular project has a current requirement not to use Ajax.

Guy