Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
displaying random images each time page is refreshed
Old 11-25-2004, 06:05 AM displaying random images each time page is refreshed
Novice Talker

Posts: 7
Trades: 0
i am trying to execute an image refresh function on my website, where everytime the page loads up a different image will be displayed at random. i have got various javascripts examples to do this, but when i insert it into the head and body of my html code it doesn't give me any errors but at the same time it doesn't display the image. i think it might be to do with the image path, i am testing it on my computer and haven' t launched the site just as yet.

would be grateful for some help and ideas
robert475 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-25-2004, 07:19 AM
faze1's Avatar
Ultra Talker

Posts: 389
Trades: 0
Hello Robert475.

Welcome to the forum. Here is an option using php. Easy to follow config and no editing the code to add or remove images, it just includes any image you keep in a specified directory.

Cheers,
__________________
[size=2]
Please login or register to view this content. Registration is FREE
- Webhosting - Focusing on quality service
faze1 is offline
Reply With Quote
View Public Profile Visit faze1's homepage!
 
Old 11-25-2004, 07:22 AM
Ultra Talker

Posts: 377
Trades: 0
How do you set your ways to images???
__________________
andrews_john

Please login or register to view this content. Registration is FREE
andrews_john is offline
Reply With Quote
View Public Profile Visit andrews_john's homepage!
 
Old 11-25-2004, 08:32 AM
theshiznit's Avatar
Registered User

Posts: 214
Trades: 0
you could also use javascript!


Code:
//create a new array
Var pic = new Array
pic[0] = "your link";//add your link here
pic[1] = "your link";
pic[2] = "your link";

// get a random integer between 0 and 2
var rand = Math.floor(Math.random() * 3);

documnet.getElementById("pic").src = pic[ rand ]
theshiznit is offline
Reply With Quote
View Public Profile
 
Old 11-25-2004, 08:36 AM
monkey's Avatar
Ultra Talker

Posts: 487
Trades: 0
i do this exact same thing on my blog. if you want to instant message me id be more than happy to help you set up the php script i use. very simply. all i do is drop the images i want to be randomly displayed in a folder on my server and voila!
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
monkey is offline
Reply With Quote
View Public Profile Visit monkey's homepage!
 
Old 11-25-2004, 04:05 PM
Spud In Disguise's Avatar
Super Spam Talker

Posts: 808
Location: UK... where else?
Trades: 0
Try searching on http://javascript.internet.com they've definately got one there, and it's easy to set up!
__________________

Please login or register to view this content. Registration is FREE
- Fansite

Please login or register to view this content. Registration is FREE
- Blog
Spud In Disguise is offline
Reply With Quote
View Public Profile Visit Spud In Disguise's homepage!
 
Old 11-25-2004, 04:11 PM
cjvj's Avatar
Super Spam Talker

Posts: 850
Location: Guildford, UK
Trades: 0
The exact link : http://javascript.internet.com/misce...ge-cycler.html

__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
cjvj is offline
Reply With Quote
View Public Profile Visit cjvj's homepage!
 
Old 11-25-2004, 04:28 PM
Spud In Disguise's Avatar
Super Spam Talker

Posts: 808
Location: UK... where else?
Trades: 0
Smart ***!
__________________

Please login or register to view this content. Registration is FREE
- Fansite

Please login or register to view this content. Registration is FREE
- Blog
Spud In Disguise is offline
Reply With Quote
View Public Profile Visit Spud In Disguise's homepage!
 
Old 11-25-2004, 04:35 PM
cjvj's Avatar
Super Spam Talker

Posts: 850
Location: Guildford, UK
Trades: 0
Heh

Some more:

http://www.hotscripts.com/Detailed/14496.html <-- DHTML
http://www.hotscripts.com/Detailed/6582.html <-- Jarva Script
http://www.hotscripts.com/Detailed/4488.html <-- PHP

Take your pick!
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
cjvj is offline
Reply With Quote
View Public Profile Visit cjvj's homepage!
 
Old 11-25-2004, 04:42 PM
Spud In Disguise's Avatar
Super Spam Talker

Posts: 808
Location: UK... where else?
Trades: 0
Is that just coz it was in my sig also? :-D
__________________

Please login or register to view this content. Registration is FREE
- Fansite

Please login or register to view this content. Registration is FREE
- Blog
Spud In Disguise is offline
Reply With Quote
View Public Profile Visit Spud In Disguise's homepage!
 
Old 11-25-2004, 08:10 PM
Archie's Avatar
Skilled Talker

Posts: 64
Trades: 0
Quote:
Originally Posted by cjvj

what is this jarva script you speak of? heheheh, sorry. Reminded me of the slug from star wars, so I had to say something.

*drifts back into shadow*
Archie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to displaying random images each time page is refreshed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.37085 seconds with 12 queries