Java script modification question

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

bassetman

Thread Starter
Moderator (deceased) - Gone but never forgotten
Joined
Jun 7, 2001
Messages
47,973
I would like to have this part of a script grab the "pics" from a different Directory, so that I can run another version on a different page with different pics.

Sooo... how do I modify this to have it grab the pics from a Dir (such as Images)?

PHP:
<script language="javascript1.1">

today = new Date();
day = today.getDay();

arday = new Array("Sunday.jpg", "Monday.jpg", "Tuesday.jpg", "Wednesday.jpg", "Thursday.jpg", "Friday.jpg", "Saturday.jpg");

document.write("<img src='" + arday[day] + "'>");

</script><P>
 
Joined
Apr 30, 2001
Messages
2,636
Code:
document.write('<img src="Images/' + arday[day] + '">');
(assuming the Images folder is a subfolder of the current folder.)
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top