![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
|
[SOLVED] Image Rotating?
I think this kind of stuff is called a script? Well I want to add one to my website. all I need it to do is - load another image each time I enter a web page.
Do you have any suggestions? I would greatly appreciate it! Thank You |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Registered User
|
Re: Image Rotating?
In the <head> add
<script language="javascript" type="text/javascript"> img2 = new Image() seconds = "5"; function imgOne1() { document.myimg1.src = 'image name'; setTimeout("imgTwo1()", seconds * 1000); } function imgTwo1() { document.myimg1.src = 'image name'; setTimeout("imgThree1()", seconds * 1000); } function imgThree1() { document.myimg1.src = 'image name'; setTimeout("imgFour1()", seconds * 1000); } function imgFour1() { document.myimg1.src = 'image name'; setTimeout("imgOne1()", seconds * 1000); } </script> Then in the body add onload="imgOne1()" ex. <body onload="imgOne1()"> Then finally in the html where you would like the image to appear add <img src="first image you want to load" name="myimg1">
__________________
"If it's really a supercomputer, how come the bullets don't bounce off when I shoot it ?" <<PC Pitstop>><< AVG Free>><<Spybot>><<Everest 2.0>><<Trend Micro House Call>><<HijackThis How-to>> |
|
|
|
|
|
#3 (permalink) |
|
Registered User
|
Re: Image Rotating?
don't get it...
ok, for example we have 3 images www.link.com/image1.jpg www.link.com/image2.jpg www.link.com/image3.jpg how would i put it on the page? |
|
|
|
|
|
#4 (permalink) |
|
Tech, Design Team
|
Re: Image Rotating?
You can use this generator to enter your images and it will produce the code for you to paste into your website. http://javascript.internet.com/gener...ad-images.html
__________________
. ![]() |
|
|
|
|
|
#5 (permalink) |
|
Professor/Moderator, TSF Design School
Join Date: Jun 2005
Location: Australia
Posts: 2,383
OS: Windows Vista SP2 32bit
|
Re: Image Rotating?
I'm stumped. Generator would be the way to go for me too here
__________________
==========================================
Get Help: TSF Security Forum | HijackThis | MB's 5 Step Process Get Clean: AdAware SE | Spybot S&D | CWShredder | Ewido | CleanUp! Get Protected: SpywareBlaster | SpywareGuard | Windows Updates | IE-SpyAd If TSF has helped you, please consider making a donation to help keep the board running. |
|
|
|
|
|
#7 (permalink) |
|
Registered User
|
Re: Image Rotating?
Oh... no I was wrong, the problem is not solved. that was not an image rotating script.... it is a roll over script, right? what i need is:
I have 3 images. i want to see 1 image display when i enter the page. then, when i enter the page 2nd time i want a 2nd image to be displayed.. then when, i enter the same page again i want a third image to be displayed. in fact the order does not have to be 1st image, then 2nd, then 3rd... i don't care if it goes 1,3,2.... i just want the to change each time. anybody can help? |
|
|
|
|
|
#8 (permalink) |
|
Professor/Moderator, TSF Design School
Join Date: Jun 2005
Location: Australia
Posts: 2,383
OS: Windows Vista SP2 32bit
|
Re: Image Rotating?
Are you suggesting that say you enter the home page and an image called X appears.
At another you enter the home page and a Y image appears. So your asking for random images to be displayed out of a database of images?
__________________
==========================================
Get Help: TSF Security Forum | HijackThis | MB's 5 Step Process Get Clean: AdAware SE | Spybot S&D | CWShredder | Ewido | CleanUp! Get Protected: SpywareBlaster | SpywareGuard | Windows Updates | IE-SpyAd If TSF has helped you, please consider making a donation to help keep the board running. |
|
|
|
|
|
#9 (permalink) |
|
Design Team
Join Date: Mar 2006
Location: Philadelphia
Posts: 1,541
OS: Windows Vista Home Premium (x64)
|
Re: Image Rotating?
Here you are: http://javascript.internet.com/misce...or.html#source
__________________
Nice music blog ![]() Nvu || Notepad++ || Apache || PHP || Keep TSF Alive "The great thing about a computer notebook is that no matter how much you stuff into it, it doesn't get bigger or heavier." |
|
|
|
|
|
#10 (permalink) |
|
Professor/Moderator, TSF Design School
Join Date: Jun 2005
Location: Australia
Posts: 2,383
OS: Windows Vista SP2 32bit
|
Re: Image Rotating?
There you go. Fair enough. Something I learnt today
__________________
==========================================
Get Help: TSF Security Forum | HijackThis | MB's 5 Step Process Get Clean: AdAware SE | Spybot S&D | CWShredder | Ewido | CleanUp! Get Protected: SpywareBlaster | SpywareGuard | Windows Updates | IE-SpyAd If TSF has helped you, please consider making a donation to help keep the board running. |
|
|
|
|
|
#11 (permalink) |
|
Registered User
|
Re: Image Rotating?
Grove Yes!
DJ-Zep This is not what I need... As you can see this script rotates a series of images on the page every FEW SECONDS. I don't need that. I need a script that displays a different image EVERYTIME A PAGE IS REFRESHED PS: but I will take a note of that last one you gave me. I'll make some use for that too! But I still need what I came here looking for. Thanks.. Last edited by ervand; 04-16-2007 at 08:01 PM. |
|
|
|
|
|
#12 (permalink) |
|
Professor/Moderator, TSF Design School
Join Date: Jun 2005
Location: Australia
Posts: 2,383
OS: Windows Vista SP2 32bit
|
Re: Image Rotating?
Something I picked up while doing a bit of "research" ...
Insert the following code between the <head> and </head> tags. Code:
<script language="JavaScript">
// Drummy's Random Image Script
// (C) 2006 Paul Voth, Drummy.org
// Please leave this copyright notice
// In the script if you're gonna use it :)
function get_random()
{
// Make sure that random()*X) has the correct
// number. The number of images defined below.
var ranNum= Math.floor(Math.random()*1);
return ranNum;
}
var whichImg=get_random();
function show_image() {
// Add your images here.
// Make sure that Array(X) has the number
// of images that you want to include
var img=new Array(1)
img[0]="www.techsupportforum.com";
// Here the actual displaying of the image is taking place.
document.write("<img src='");
document.write(img[whichImg]);
document.write("' border='0' />");
}
</script>
Code:
<script language="JavaScript">show_image();</script>
__________________
==========================================
Get Help: TSF Security Forum | HijackThis | MB's 5 Step Process Get Clean: AdAware SE | Spybot S&D | CWShredder | Ewido | CleanUp! Get Protected: SpywareBlaster | SpywareGuard | Windows Updates | IE-SpyAd If TSF has helped you, please consider making a donation to help keep the board running. |
|
|
|
![]() |
| Thread Tools | |
|
|