JavaScript

Moderators: None (Apply to moderate this forum)
Number of threads: 2058
Number of posts: 5158

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Popup stuff Posted by SaMo on 2 Apr 2005 at 5:30 AM
Hello everyone!

What I need is to open a popup window, run certain actions there and then close the popup, passing the control back to the popup calling window along with the information user entered in the popup. While opening the popup itself and running certain pages there is pretty straightforward, I have no idea how to accomplish the rest. It may be possible to transfer information between windows with the help of session, but I am not sure if both popup and calling window will belong to same one session. And I definitely do not know how to switch back to the calling window when popup has finished its work.

Any help greatly appreciated.
Report
Re: Popup stuff Posted by myrddin on 5 Apr 2005 at 1:11 PM
: Hello everyone!
:
: What I need is to open a popup window, run certain actions there and then close the popup, passing the control back to the popup calling window along with the information user entered in the popup. While opening the popup itself and running certain pages there is pretty straightforward, I have no idea how to accomplish the rest. It may be possible to transfer information between windows with the help of session, but I am not sure if both popup and calling window will belong to same one session. And I definitely do not know how to switch back to the calling window when popup has finished its work.
:
: Any help greatly appreciated.
:

Below is the script from a pop-up that I use. This code is the whole pop-up page. Once this window closes, the 'parent' window should still be on 'top'. Rather simple, but (as a beginner) something I have used successfully in several of my pages.

If an error is encountered, this page stays open with the error displayed, so you will need to use error handling to ignore the error (i.e. OnError ResumeNext).

<!--FILENAME: w_updt_sql.asp-->
<!--executes update sql statement passed to it -->

<!--#INCLUDE FILE="dbConn.asp"-->
<%
Dim sql_update

sql_update=Trim(request("sql_update"))

Set RSstatus = Conn.Execute(sql_update)


%>
<script>
window.close();
</script>




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.