New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Web Design and Hosting Creating sites, scripting, and hosting discussions.

Random photo


Post Reply New Thread Subscribe

 
Thread Tools
boarderjosh10

 
Member Since: Aug 11, 2005
Posts: 285
boarderjosh10 is on a distinguished road

boarderjosh10 is offline
On my webpage I have a rectangle with my "photo of the day" I have had to change it manually everyday. But I want to make it so when somebody comes to my webpage it will just randomly change when they access the page, it doesnt even have to be daily, just everytime the page is accessed the photo will change. If I put all of the photos I want it to cycle through ina folder on my server how would I do it, I dont know any php or java, just some html, and if it is something in java is "copy and pastable"
QUOTE Thanks
puaerotch

 
puaerotch's Avatar
 
Member Since: Sep 21, 2005
Location: ohio
Posts: 809
puaerotch is a glorious beacon of lightpuaerotch is a glorious beacon of lightpuaerotch is a glorious beacon of lightpuaerotch is a glorious beacon of lightpuaerotch is a glorious beacon of lightpuaerotch is a glorious beacon of light
Mac Specs: iBook G4 OSX Tiger

puaerotch is offline
just put it where you want the photos and all you have to do is change the info in orange

<script LANGUAGE="JavaScript">
<!-- Begin
var how_many_ads = 2;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
txt="";
url="http://url the image links to";
alt="image label";
banner="url of the image itself (ex. http:/ /website.com/imageurl.jpg)";
width="x";
height="x";
}
if (ad==2) {
txt="";
url="http://url the image links to";
alt="image label";
banner="url of the image itself (ex. http:/ /website.com/imageurl.jpg)";
width="x";
height="x";
} HERE
document.write('<center>');
document.write('<a href=\"' + url + '\" target=\"_top\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0><br>');
document.write('<small>' + txt + '</small></a>');
document.write('</center>');
// End -->
</script>



to add more than 2 add the following where it says HERE and change the numbers to the necessary numbers (dont forget to remove the HERE )

if (ad==2) {
txt="";
url="http://url the image links to";
alt="image label";
banner="url of the image itself (ex. http:/ /website.com/imageurl.jpg)";
width="x";
height="x";
}
QUOTE Thanks

Post Reply New Thread Subscribe


« Search box on webpage | paypal »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Photo of the Month: September 2005 schweb Archival Forum 28 09-30-2005 08:38 AM
Random screensaver but without : Photo library etc... bellastrada OS X - Operating System 0 06-04-2005 02:38 PM
Ipod Mini and Ipod Photo Updates Finally Out!`` Computer.Geek iPod Hardware and Accessories 18 02-24-2005 09:30 AM
reePhotoiPods.com Get a free 40gb Photo iPod zachhale iPod Hardware and Accessories 1 11-02-2004 11:31 PM
Digital Camera - Size Setting for Best Photo Printout iKwak Schweb's Lounge 3 04-16-2004 10:59 AM

All times are GMT -4. The time now is 10:54 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?