View Single Post
Old 28-09-2004, 11:01   #3
Caspar
Inactive
 
Join Date: Jun 2003
Location: UK
Posts: 4,988
Caspar has reached the bronze age
Caspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze age
Re: Need some javascript help

Ok my revised code:

index.htm
//File that loads the script
Code:
<SCRIPT LANGUAGE="JavaScript">
today = new Date();
day = today.getDay();

if (day == "2") {
	window.open('newwindow.htm','','scrollbars=yes,resizable=no');
}	
</script>

newwindow.htm
//contents of the popup
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=javascript:void(top.close());><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>
</script>
Caspar is offline   Reply With Quote