Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Where Am I

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,54182
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Where Am I
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Where Am I - 12/11/2007 7:25:47 AM   
  TNO


Posts: 1400
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
While working on my new XML component, I cam across a small puzzle.

How could I make my script tell wether its on a webserver or a client so i can appropriately call Server.MapPath() method or call a normal save() method? My initial thought is to just try and call Server.MapPath to see if it throws an error or something....

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch
 
 
Post #: 1
 
 RE: Where Am I - 12/11/2007 7:58:58 AM   
  ehvbs

 

Posts: 2223
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Hi TNO,

If you don't want to set a global variable at an early point (where you know where you are),
you could check for the existence of .document vs. Server (.response ...) - but that would
need an OERN too.

Looking forwards to your XML component!

ehvbs

(in reply to TNO)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Where Am I Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts