Access content page controls in pop up window(.aspx page) using javascript

Mgvwotgekhebd

New Member
I have a mater page. Within that I have a content page. I am opening a pop up window from this content page using using window.open method. I also tried opening a modal dialog box as an alternate option.\[code\]window.open("WebForm2.aspx?name1="+d+"&name2="e+,"MyWindow","height=375,width=350");\[/code\]'d' & 'e' are the control id, that I have passed, and accessing in pop up window.I want to access control values in the content page from the pop up(and vice-versa). All the controls that I am attemptimg. to access are in a gridview. However, I am unable to do so?To acheive this, I passed the specific values, that I intend to access, in the url, to the pop up window. This way the values are accessible but they seem very cumbersome. \[code\]alert(window.opener.document.getElementById(GetQueryStringParams('name1')).value); \[/code\]\[code\]function GetQueryStringParams(sParam){ var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { var sParameterName = sURLVariables.split('='); if (sParameterName[0] == sParam) { return sParameterName[1]; } }}\[/code\]I cannot find a way to access values of pop up page to content page.Any help would be appreciated.Thanks in advance
 
Back
Top