Computing.Net > Forums > Programming > Get data from popup window (ASP)

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Get data from popup window (ASP)

Reply to Message Icon

Name: charles_cp
Date: May 11, 2005 at 07:39:20 Pacific
OS: Windows XP
CPU/Ram: Intel P4
Comment:

Dear All,

I would like to get data from a popup window. I had design the following code. When I run test.asp and click the button, the popup window will show and the user can input data in the input box. After that, the user click the button in popup window. The test.asp will show the data.
The problem is I cannot show the data without the input box in test.asp. Can save the data to Session("aaa") in popup window? Then, I can use Response.write Session("aaa") to show the data without the input box.


test.asp


<SCRIPT LANGUAGE="JavaScript">
function ShowPopup(oDoc)
{
window.open("test2.asp?backf="+oDoc,"window", "height=210, width=300, resizeable=no,","");
}
</script>


Please click the button to add the text:</p>
<form method="POST" name="HICSF">
<input id="VonDatum" type="text" name="txtDate" size="20" >
<input type="button" value="Click me to add" onClick="javascript:ShowPopup('HICSF.VonDatum')"></form>


test2.asp


<%
RecObj = Request.QueryString("backf")
Response.Write "<Script language='javascript'> "
Response.Write "var l_SelDate; "
Response.Write "function PutDate() "
Response.Write "{ "
Response.Write "window.opener." & RecObj & ".value = document.test2.T1.value; "
Response.Write "window.close(); "
Response.Write "} "

Response.Write "</Script> "
%>
<Script language="javascript">

window.moveTo((window.screen.width - 300),(window.screen.height - 125)/2);
</Script>


<form method="POST" action="" name="test2">

<input type="text" name="T1" size="20"></p>

<input type="submit" value="Submit" name="B2" onClick="javascript:PutDate();"></p>
</form>


Thank you very much!
Charles



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Get data from popup window (ASP)

Screen Scraping www.computing.net/answers/programming/screen-scraping/1818.html

get data value from system routine www.computing.net/answers/programming/get-data-value-from-system-routine/7387.html

Passing data from C++ to C# www.computing.net/answers/programming/passing-data-from-c-to-c/14902.html