Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 16th, 2003, 06:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Arlington, TX, USA.
Posts: 119
Thanks: 0
Thanked 1 Time in 1 Post
Default Question: Using Popup & Parent windows in ASP

I need the ability to create a popup window based on the database info I
have in my table and create in that popup window a link to a specific page
in the parent window and finally stopping the popup window effect if the
database info criteria is met. Can I do that since I am assuming that I
am within the same session?

If so, is there an example that anyone knows of I can reference?

Any help would be appreciated. Thank you
 
Old July 25th, 2003, 11:08 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to edislasm
Default

You can load the window properties from a recordset or ADODB connection and then use the javascript like in this example:

winpops = window.open(("yourpage.asp?nickname=<%= nickname %>),"Cheking Password","width=<%= width %>,height=<%= height %>,top=<%= top %>,left=<%= left %>,");
winpops.focus();

I don't know what you want to do exactly. But here, the script will open a window and send the nickname as a variable. The second parameter is the window title and then I sepcify width, height, etc. from my database parameters.

Then, I ask for the password in that window and submit the form with the nickname and password variable to a page that will check the password like this:

<% If Request("password")=recordset1.Fields.Item("passwo rd").Value Then %>
//here you write the javascript for closing the window
<% Else %>
Wrong password
<% End If %>

Hope that helps.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Databinding Parent Dropdown from Popup bijukprm ASP.NET 2.0 Basics 0 September 5th, 2007 11:49 PM
Problem in closing the parent window from a popup rakesh.kashnia1 Javascript 4 July 9th, 2007 05:39 AM
Centering Popup window & Blur Parent window jkusmanto Javascript How-To 0 May 25th, 2007 03:19 AM
Popup Windows myAsp Classic ASP Basics 9 March 16th, 2004 05:03 PM
refresh the parent window when closing the popup ram_siddinen VS.NET 2002/2003 1 January 30th, 2004 04:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.