| View previous topic :: View next topic |
| Author |
Message |
SuziQ
Joined: 29 Oct 2006 Posts: 2
|
Posted: Fri Nov 03, 2006 6:37 pm Post subject: Changing Graphics |
|
|
I need to change graphics from month to month on my website. For instance, I need to change an October graphic to a November graphic. Can can this be done using JavaScript (JS) and how is it done?
Help will be appreciated.
SuziQ[/url] |
|
| Back to top |
|
 |
|
|
Iain
Joined: 30 Nov 2006 Posts: 2
|
Posted: Fri Dec 01, 2006 10:54 am Post subject: Graphics based on month |
|
|
Hi Suzi
Iain here, I've got the same problem and I am trying to ase an if (date=something) the show (image name) type idea but can't get javascript to load a graphic after the if condition.
Tell you what though, when I get an answer, I'll fire it over to you. Perhaps you'd be good enough to do same!
Iain |
|
| Back to top |
|
 |
SuziQ
Joined: 29 Oct 2006 Posts: 2
|
Posted: Sat Dec 02, 2006 6:01 am Post subject: Changing Graphics |
|
|
Hi, Iain~
Will do. When I find out how to do this I'll be sure to let you know.
Suzi [/b] |
|
| Back to top |
|
 |
ngpgeeta
Joined: 18 Nov 2006 Posts: 19
|
Posted: Sun Dec 17, 2006 11:32 am Post subject: Re: Changing Graphics |
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script>
function changing()
{
var arr=new Array(1,2,3,4,5,6,7,8,9,0)
var dt=new Date()
dt=dt.getDate()+"/"+(dt.getMonth()+1)+"/"+dt.getYear()
switch(dt)
{
case "1/1/2006": document.first.src="two.jpg"
break
case "1/2/2006": document.first.src="three.jpg"
break
}
}
</script>
</head>
<BODY onload="changing()">
<img name="first" src="one.jpg" width=100 height=300>
</BODY>
</HTML>
Hope this helps! |
|
| Back to top |
|
 |
|