HI! ray, first your most use the extension .asp and then you can put some in
your global.asa page.
Here is an example plan example of one of my global.asa files. and notice
towards the bottom as I put a small command to abandon the session on End.
---------------------------------------------Example------------------------
-------------------
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
'You can add special event handlers in this file that will get run
automatically when
'special Active Server Pages events occur. To create these handlers, just
create a
'subroutine with a name from the list below that corresponds to the event
you want to
'use. For example, to create an event handler for Session_OnStart, you would
put the
'following code into this file (without the comments):
'Sub Session_OnStart
'**Put your code here **
'End Sub
'EventName Description
'Session_OnStart Runs the first time a user runs any page in your
application
'Session_OnEnd Runs when a user's session times out or quits your
application
'Application_OnStart Runs once when the first page of your application is
run for the first time by any user
'Application_OnEnd Runs once when the web server shuts down
Sub Session_OnEnd
Session.Abandon
Sub Session_OnStart
Session("CameFrom")=Request.ServerVariables("HTTP_REFERER")
End Sub
End Sub
</SCRIPT>
---------------------------------------End of
Example-----------------------------------
Here is another example of how to use a session var. this is the first line
in the page.
session("image")="/images/mainlogo.gif" ( I am not sure about the quotes
around the images/mainlogo.gif, just remove then if it does not work.)
-----This will request the session var once you have set it in your start
page for example.
<%
Session("image")=Request("image")
%>
----------------------------------------------------------------------------
------
------Now here is how you can use it.
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 7.0">
<title>Your Website</title>
</head>
<body background="<%=Session("image")%>"
----------------------------------------------------------------------------
-----
You can also put multiple variables declarations in a .js file ( you can
even create it in notepad - just simple text file.)
----Here's how to initiate them. ( put it in the head section.)
<head>
<title>Your Website</title>
<Script Language="JavaScript" src="../jsfiles/mainvars.js"></Script>
</head>
----------------------------------------------------------------------------
-----
I hope this helps answer a few of your questions.
Paul Dallaire--Odyssey
[email protected]