ChrisRChamberlain
Programmer
Hi all
Following snippet will redirect to mysite.com but have a single website accessible also as mysite.net., mysite.org, etc.
Would like to add a variable, say var this_domain, to which would be assigned the current domain, and then use
or similar.
Uncertain as to how to assign the domain value to the variable?
TIA
![[pc2] [pc2] [pc2]](/data/assets/smilies/pc2.gif)
PDFcommander.com
motrac.co.uk
Following snippet will redirect to mysite.com but have a single website accessible also as mysite.net., mysite.org, etc.
Code:
<script language="javascript" type="text/javascript">
<!--
window.setTimeout('window.location="[URL unfurl="true"]http://www.mysite.com/index.html";[/URL] ',5000);
// -->
</script>
Code:
'window.location=this_domain+"/index.html"; '
Uncertain as to how to assign the domain value to the variable?
TIA
FAQ184-2483
Chris ![[pc2] [pc2] [pc2]](/data/assets/smilies/pc2.gif)
PDFcommander.com
motrac.co.uk