Dylan Leblanc
01-26-2003, 09:35 PM
I am writing some Javascript code that will be running on more then one website. I want it to be able to detect which site it is being run from.
How can I get the domain name?
such as:
site = someSortOfFunctionToGetDomainName();
if (site == 'skyscraperpage.com')
doSomething();
if (site == 'skyscrapers.com')
doSomethingElse();
Or if there is a way to get the URL that might also work.
How can I get the domain name?
such as:
site = someSortOfFunctionToGetDomainName();
if (site == 'skyscraperpage.com')
doSomething();
if (site == 'skyscrapers.com')
doSomethingElse();
Or if there is a way to get the URL that might also work.