Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional 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 January 26th, 2005, 05:41 AM
Registered User
 
Join Date: Jan 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to handle multiple IE windows

Scenerio:
I have opened two IE windows on my computer accessing the same ASP page (testing.asp)
I want to be able to handle the data generated by each window independently and save the data into the same database.
However, I also want to be able to retrieve the respective data stored in the database by each window.
How am I going to go about identifying each IE window?
Thanks in advance for your assistance.
 
Old January 26th, 2005, 05:58 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

You are requested not to post the same issue in more than one area however urgent your issue may be. It is very difficult for the moderators to manage issues.

Anyway, I will give my comments on your issue. You need to create a unique string whenever this page (testing.asp) is accessed. It can be created by appending date, month, year, hour, minute,second, microsecond and a random number of some 6 digits. This will make sure that the string generated is unique and, from time to time, new strings will be generated. Then this string should also be saved into db.

So when the page is accessed by each window, it will generate new and new random strings.

Check whether this helps.
 
Old January 26th, 2005, 07:34 AM
Registered User
 
Join Date: Jan 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I apologise for posting in more than one area. I won't do this again.
I'm just not sure where this problem should belong to which area.

Thank you for your comment. I will try this and see whether this will work.
 
Old January 26th, 2005, 07:57 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

It's OK. Cool.

Best wishes

Madhu
 
Old January 26th, 2005, 09:17 PM
Registered User
 
Join Date: Jan 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry to bother you all again, but I have a problem.
How am I going to store the unique ID for each window in the respective window?
Am I able to create a global variable in each IE window which will be accessible by all frames in the window?
Thanks in advance for your assistance.
 
Old January 27th, 2005, 12:21 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

You can store the unique id in session.

use

Session("gblUniqueID")=<created id>

immediately after creating it.

Then in other pages you can access it as

Session("gblUniqueID")
 
Old January 28th, 2005, 12:17 AM
Authorized User
 
Join Date: Dec 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jaywhy13 Send a message via Yahoo to jaywhy13
Default

Just a quick suggestion... why don't u try uh like allowing the database to create the ID for u.. so that way u don't have to worry about the ID creation and distinction part But ALSO store the date/time and so on and so forth in the database?

Jay
Knowledge is power and igorance is bliss... which is more exciting?
 
Old January 28th, 2005, 12:52 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Could you be little more specific about this ? Are you suggesting that we can use database for session handling ?
 
Old January 28th, 2005, 08:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

Yes, sure you can.
Code:
' Global.asa

<script language="vbscript" runat="server">
sub Session_OnEnd
'Store anything from your sessions into your database
end sub
</script>
In case you are wondering what the METADATA part is doing, it's instead of having the ADO constants file (and include that everywhere you use ADO) uploaded to your site.

 - mega
Moving to C# .NET





Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting a Handle on Windows Login with AD dparsons C# 0 February 28th, 2007 09:30 PM
JScript and multiple windows Quick209 Java Basics 2 February 11th, 2006 01:28 PM
How to handle multiple IE windows ah_teck81 Classic ASP Basics 0 January 26th, 2005 05:40 AM
how to handle multiple projects Ramakrishna.G General .NET 4 September 14th, 2004 12:31 PM





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