I have a function that takes the value from a text area in the parent window and passes it into a pop up window. The value is too large to pass into a query string. The value being passed in will be used as an ASP server variable. The pop up window will take the variable (it's a SQL query) and execute the query and display the results. How can I pass this value into the pop up?
***parent window***
<body>
<form id="formQuery">
<table>
<tr>
<td class="Data"><textarea cols="169" rows="3" id="textareaSQLQuery"></textarea></td>
</tr>
<tr>
<td><button onclick="DisplayResultsOnClick()"><u>D</u>isplay Results</button></td>
</tr>
</table>
</form>
</body>
***Function to pass string into pop up window***
function DisplayResultsOnClick() {
// Get SQL query from text area
strSQLQuery = formQuery.textareaSQLQuery.value
// Set popup window to display query results
var strFeatures = "location=no,menubar=no,resizable=yes,status=no,toolbar=no,scrollbars=no,height=675,width=970,top=20,left=25"
// Set the URL
var strURL = "display_results.asp"
// Open window
var objWindow = window.open(strURL, "", strFeatures)
}
***parent window***
<body>
<form id="formQuery">
<table>
<tr>
<td class="Data"><textarea cols="169" rows="3" id="textareaSQLQuery"></textarea></td>
</tr>
<tr>
<td><button onclick="DisplayResultsOnClick()"><u>D</u>isplay Results</button></td>
</tr>
</table>
</form>
</body>
***Function to pass string into pop up window***
function DisplayResultsOnClick() {
// Get SQL query from text area
strSQLQuery = formQuery.textareaSQLQuery.value
// Set popup window to display query results
var strFeatures = "location=no,menubar=no,resizable=yes,status=no,toolbar=no,scrollbars=no,height=675,width=970,top=20,left=25"
// Set the URL
var strURL = "display_results.asp"
// Open window
var objWindow = window.open(strURL, "", strFeatures)
}