Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 26th, 2005, 05:41 AM
Registered User
 
Join Date: Jan 2005
Location: , , .
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.
Reply With Quote
  #2 (permalink)  
Old January 26th, 2005, 05:58 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
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.
Reply With Quote
  #3 (permalink)  
Old January 26th, 2005, 07:34 AM
Registered User
 
Join Date: Jan 2005
Location: , , .
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.
Reply With Quote
  #4 (permalink)  
Old January 26th, 2005, 07:57 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
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
Reply With Quote
  #5 (permalink)  
Old January 26th, 2005, 09:17 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
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.
Reply With Quote
  #6 (permalink)  
Old January 27th, 2005, 12:21 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
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")
Reply With Quote
  #7 (permalink)  
Old January 28th, 2005, 12:17 AM
Authorized User
 
Join Date: Dec 2004
Location: , , .
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?
Reply With Quote
  #8 (permalink)  
Old January 28th, 2005, 12:52 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
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 ?
Reply With Quote
  #9 (permalink)  
Old January 28th, 2005, 08:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen N, , Denmark.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:27 AM.


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