Hi All,
I can’t seem to figure this out, what im trying to do below is to show a div layer by host location, but doesnt work. any ideas?
[code=html]
<script type=”text/javascript” language=”JavaScript”>
var b = “www.yahoo.com”;
var p = “www.msn.com”;
if (location.host = b)
{
document.getElementById(x).style.display = “block”;
}
else if (location.host == p)
{
document.getElementById(a).style.display = “block”;
}
</script>
<style type=”text/css”>
#x {
z-index:1;
display: none;
}
#a {
z-index:2;
display: none;
}
</style>
</head>
<body>
<div id=”x”>
<p>Content X</p>
<p>Content X</p>
<p>Content X</p>
</div>
<div id=”a”>
<p>Content A</p>
<p>Content A</p>
<p>Content A</p>
</div>
</body>
</html>
thank you