The code is fine, so long there's a document.referrer you can grab off
the window.history stack, document.referrer returns the previous url in
the history object provided this page was loaded BY CLICKING ON A LINK ON
THE PREVIOUS PAGE, if not, it'll return a blank, and window.history can be
flushed by several things, the server may be restricting the browser to no
caching, or opening a browser session, or a secure connection with no
caching or page expirations.
Danny
On Thu, 09 Jun 2005 08:47:39 -0700, Fabri <no@sp.am> wrote:
Why if, f.e., if I write in the page:
var r = (document.referrer).toLowerCase();
var p = r.split("middle")[1];
document.write("-->"+p);
it works
but if I put this script in an external script and insert into multiple
pages with
<script src="my.js"></script>
it doesn't?
Help appreciated.
Regards.
--
Using Opera's revolutionary e-mail client:
http://www.opera.com/mail/