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:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* 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
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
LinkBack Thread Tools
Old 04-12-2007, 01:21 AM   #1 (permalink)
Registered User
 
Join Date: Apr 2007
Location: Los Angeles, CA
Posts: 218
OS: Windows Vista Ultimate SP1

My System

[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
ervand is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
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

Old 04-12-2007, 08:09 AM   #2 (permalink)
Registered User
 
95five-0's Avatar
 
Join Date: Dec 2004
Location: Corinth, TX
Posts: 1,339
OS: 2000/XP/2003/Vista/2008


Send a message via MSN to 95five-0 Send a message via Yahoo to 95five-0
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>>
95five-0 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-13-2007, 12:53 AM   #3 (permalink)
Registered User
 
Join Date: Apr 2007
Location: Los Angeles, CA
Posts: 218
OS: Windows Vista Ultimate SP1

My System

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?
ervand is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-13-2007, 08:23 PM   #4 (permalink)
Tech, Design Team
 
devil lady's Avatar
 
Join Date: Sep 2005
Location: Tasmania, Australia
Posts: 962
OS: XP SP2

My System

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
devil lady is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-14-2007, 07:22 AM   #5 (permalink)
Professor/Moderator, TSF Design School
 
Grove's Avatar
 
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.
Grove is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-14-2007, 08:32 PM   #6 (permalink)
Registered User
 
Join Date: Apr 2007
Location: Los Angeles, CA
Posts: 218
OS: Windows Vista Ultimate SP1

My System

Re: Image Rotating?

thank you very much!
ADMINS, the problem is solved, topic can be closed.
tnx
ervand is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-14-2007, 11:01 PM   #7 (permalink)
Registered User
 
Join Date: Apr 2007
Location: Los Angeles, CA
Posts: 218
OS: Windows Vista Ultimate SP1

My System

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?
ervand is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-15-2007, 12:44 AM   #8 (permalink)
Professor/Moderator, TSF Design School
 
Grove's Avatar
 
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.
Grove is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-15-2007, 08:13 AM   #9 (permalink)
Design Team
 
DJ-Zep's Avatar
 
Join Date: Mar 2006
Location: Philadelphia
Posts: 1,541
OS: Windows Vista Home Premium (x64)

My System

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."
DJ-Zep is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-15-2007, 09:09 PM   #10 (permalink)
Professor/Moderator, TSF Design School
 
Grove's Avatar
 
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.
Grove is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-16-2007, 07:59 PM   #11 (permalink)
Registered User
 
Join Date: Apr 2007
Location: Los Angeles, CA
Posts: 218
OS: Windows Vista Ultimate SP1

My System

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.
ervand is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-17-2007, 07:48 AM   #12 (permalink)
Professor/Moderator, TSF Design School
 
Grove's Avatar
 
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>
Insert the following code where you want the random image to appear.

Code:
<script language="JavaScript">show_image();</script>
Haven't had the time to test it but it looks promising. Tell me how you go.
__________________
==========================================

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.
Grove is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

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




All times are GMT -7. The time now is 09:54 AM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85