[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Protecting from entring at a "side-door"
I would like to check whether a visitor enters my site "from the side-entry" (i.e. not
at the main page where I build up all the frames etc.) and if NO then auto-refer him
to the "main-entry".
I thought that this routine should work, but I get an error-message:
"is not a number at line 6" (line-numbers are only added for easy referencing).
Honestly the error-message is like the one above - no hint WHAT is "no number"!
1: function gotoEntry() {
2: if (document.referrer.hostname == www.myorganisation.com") {
3: alert( "Wellcome again !")
4: }
5: else {
6: window.location.href = "http://www.myorganisation.com/";
7: }
8: }
Has anyone an idea whats is going wrong? Has anyone a better (AND working) solution?
Thanks
Gerald
--
Gerald Maier - G.H.E.M.
Database-Marketing & Marketing-Analysis
***************************************
e-mail: gmaier@ghem.co.at
100140.547@compuserve.com
http://www.ghem.co.at/gmaier
Everything about
Database-Marketing and Marketing-Analysis!
***************************************
--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/