View Full Version : link opens pop-up window
DJoe
October 1st, 2005, 12:50 AM
Is there a javascript, that when you press link the different sites open in new window depending on the "day of the week"
degsy
October 1st, 2005, 02:21 AM
You can do it with Javascript or Serverside scripting such as PHP or ASP.
I will get an example script for you
Harrie
October 1st, 2005, 03:26 AM
I'm looking forward to seeing this!
degsy
October 1st, 2005, 01:26 PM
This was quickly done, but should work
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function dailyLink(){
var d=new Date()
var dLink=new Array(7)
dLink[0]="http://yahoo.com" // Sunday
dLink[1]="http://lycos.com" // Monday
dLink[2]="http://micosoft.com" // Tuesday
dLink[3]="http://mozilla.org" // Wednesday
dLink[4]="http://www.cybertechhelp.com" // Thursday
dLink[5]="http://www.w3schools.com" // Friday
dLink[6]="http://www.google.com" // Saturday
window.open(dLink[d.getDay()],"popup")
}
</script>
</head>
<body>
<a href="javascript:dailyLink()">Daily Link</a>
</body>
</html>
DJoe
October 2nd, 2005, 07:23 PM
Is there a way to make it so, the window that pops-up is at a different size & have the menubars & other bars disappeared.
degsy
October 2nd, 2005, 07:26 PM
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp
DJoe
October 2nd, 2005, 09:21 PM
I couldn't get it to work?
degsy
October 2nd, 2005, 09:27 PM
Couldn't get what to work?