How do I insert text into a textbox after popping up another window to request information?

By : Guy

I have an 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?

By : Guy


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.

You will have to do something like:

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

This video can help you solving your question :)
By: admin