I have a popup window which uses an animated DIV that a customer want's to only show on certain day's, I've got the day of the week (number) from using
Code:
<SCRIPT LANGUAGE="JavaScript">
today = new Date();
day = today.getDay();
</SCRIPT>
So for example, if day=2,5 or 7 then I want it to do the following:
Code:
<script language="JavaScript">
if (document.all) {
w = document.body.clientWidth;
h = document.body.clientHeight;
}
else if (document.layers) {
w = window.innerWidth;
h = window.innerHeight;
}
var popW = 517, popH = 417;
var leftPos = (w-popW)/2;
document.write('<div id="dropin" style="z-index:12;position:absolute;visibility:hidden;left:'+leftPos+'px;top:100px;width:517px;height:417px;filter:Shadow(color=gray,offX=-5,offY=-5,direction=145)">');
</script>
<table width="500" border="0" cellpadding="5" cellspacing="1" bgcolor="#41738D">
<tr>
<td height="160" valign="top" bgcolor="#F0F5F7">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr><td><div align="right"><a href="#" onClick="dismissbox();return false"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Close<strong>
[ X ] </strong></font></a></div></td></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td valign="top"><p>
<p align="center"><strong><font color="#FF6600">POP UP WINDOW CONTENTS GO IN HERE<br>
<br><script language=javascript>document.write(day);</script>
</font></strong></p> </td>
</tr>
</table>
</td>
</tr>
</table>
</div>
And if the day isn't one of them values .. not show it...
thanks.