Re: Web OPAC and HTTP_REFERER
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Date: Thu, 18 Aug 2005 08:19:03 -0400
- From: Jonavon Wilcox <jowilcox at vt dot edu>
- Subject: Re: Web OPAC and HTTP_REFERER
Currently the Millennium web opac does not provide a server side CGI
environment, with the exception of airpac, but you can use the
javascript document.referrer
I have not tested this but this is the possible code you want to use.
function goBasedOnWhereUHaveBeen () {
var yourLastPage = document.referrer;
if (yourLastPage == "" || yourLastPage ==
"http://www.yourmainsite.gov/"){
// Use document.location to redirect user
// document.location='http://catalog.main.gov';
// or document.write to use a different stylesheet
// document.write('<link type="text/css" rel="stylesheet"
title="Main Style" media="screen" href="/screens/styles.css" />');
}
else if (yourLastPage == 'http://www.theothersite.gov') {
// Use document.location to redirect user
// document.location='http://catalog.other.gov';
// or document.write to use a different stylesheet
// document.write('<link type="text/css" rel="stylesheet"
title="Other Style" media="screen" href="/screens/otherstyles.css" />');
}
}
If your patrons can reach your site through more than one page I would
advise using Javascript string functions to parse the domain or whatever
portion of the address you wish.
Jonavon Wilcox
Programmer
University Libraries
Virginia Tech
Katie Wilson wrote:
hi all
I'm wonder if anyone on the list has been able to implement
HTTP-REFERER with the Innovative Web OPAC.
The State Library of New South Wales is moving through a multi-phase
process
of redeveloping its public facing web services.
During parts of this phase there will be two separate sites that will
host
our initial OPAC search screens. These web sites will have
significantly
different designs.
We would like to provide our clients with a seemless transition from
the
initial search OPAC screens to the OPAC results screens hosted on our
Innovative
server by detecting which site the client has been redirected from and
presenting appropriately designed OPAC results screens using one of
two
cascading style sheet libraries based on the referring site address.
We propose using the standard CGI environment variable called
HTTP_REFERER
which will enable us to load the CSS file appropriate for clients
referred
by site A or a separate one for clients referred by site B.
Does the Innovative web server expose these standard CGI environment
variables to the OPAC templates? If so, what methods or variables does
our
web design team need to use to determine the value of these variables
at run
time?
If not, is there another method, such a passing a value as a standard
HTTP
query string parameter which can be exposed to the OPAC templates?
In addition, does Innovative's web server provide the equivalent of a
SESSION
scope for storing variables for the life of a client's session?
thanks in advance
regards
Katie
Katie Wilson
Manager, Digital & Library Systems (Acting)
electronic Library Services
State Library of NSW
Macquarie St,
Sydney, NSW 2000
Australia
kwilson at sl dot nsw dot gov dot au
tel: +61.2.9273.1574
fax: +61.2.9273.1268
http://www.sl.nsw.gov.au/
Dig in at Australia's most exciting research library http://www.atmitchell.com
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
///Please note/// This email and any attachments to it are privileged and confidential. If you are not the intended recipient, please notify the sender and delete it. The contents of this email are not given or endorsed by the State Library of New South Wales unless otherwise indicated by an authorised officer of the Library. Copyright law may also apply to the contents of this email.
<<<< GWAVASIG >>>>
--
This message was distributed through the Innovative Users Group INNOPAC list
Public replies: INNOPAC at innopacusers dot org
Update your subscription options: http://innopacusers.org/mailman/listinfo/innopac