Option 1 is to use a query string
string TextBox1= document.getElementById('ParentTextBoxname');
Window.open ("popup.aspx?text=" + TextBox1.value)
if query string doesnt work for you, Option 2 is to access the textbox
directly from parent.. but the popup page will need to grab this value and
postback to itself to run the query. (assuming there are no frames in parent
page) following is the javascript to access the textbox in parent window
window.parent.document.forms[0].ParentTextBoxname.value;
"Aaron" wrote:
I am having a little difficulty with a relatively simple task.
I have a parent webform. I have a javascript attribute added to a button to
open a new window when clicked.
The user fills in a textbox then clicks the button and on page load the
child window should grab that val run a query an present the results.
Given that I am bouncing between server side controls and client script. I
am just having a little trouble passing my textbox value over to the popup.
Any help would be appreciated.