Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Changing Graphics



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> JavaScript Forum
View previous topic :: View next topic  
Author Message
SuziQ



Joined: 29 Oct 2006
Posts: 2

PostPosted: Fri Nov 03, 2006 6:37 pm    Post subject: Changing Graphics Reply with quote

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
View user's profile Send private message
Iain



Joined: 30 Nov 2006
Posts: 2

PostPosted: Fri Dec 01, 2006 10:54 am    Post subject: Graphics based on month Reply with quote

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! Very Happy

Iain
Back to top
View user's profile Send private message
SuziQ



Joined: 29 Oct 2006
Posts: 2

PostPosted: Sat Dec 02, 2006 6:01 am    Post subject: Changing Graphics Reply with quote

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
View user's profile Send private message
ngpgeeta



Joined: 18 Nov 2006
Posts: 19

PostPosted: Sun Dec 17, 2006 11:32 am    Post subject: Re: Changing Graphics Reply with quote

<!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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> JavaScript Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap