hi all
why does this code does not work when I add the if statement?
<html>
<head>
The domain name for this document is:
<script type="text/javascript">
document.write(document.domain)
var x=document.domain
if (x == "www.mysite.com") {
window.location = "http://www.mysite.com/";
)
else
{
window.location = "http://www.myotherdomain.com";
}
document.write(x);
</script>
</head>
<body>
</body>
</html>
why does this code does not work when I add the if statement?
<html>
<head>
The domain name for this document is:
<script type="text/javascript">
document.write(document.domain)
var x=document.domain
if (x == "www.mysite.com") {
window.location = "http://www.mysite.com/";
)
else
{
window.location = "http://www.myotherdomain.com";
}
document.write(x);
</script>
</head>
<body>
</body>
</html>