SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old January 31st, 2005, 07:52 AM
MIO MIO is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Downey, CA
Posts: 12 MIO User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Rotating Banner

If anyone could help me with a little problem I have? I have rotating banners on my website but it only changes when it is refreshed. Is there any possability to have it refresh every 10 seconds or so? my web page is www.maxitout.tv . I really apreciate it.

Thanks in advance
Jose

Reply With Quote
  #2  
Old January 31st, 2005, 02:37 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Rotating Banner

You need to use javascript instead of PHP

Doj

Reply With Quote
  #3  
Old January 31st, 2005, 06:29 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Rotating Banner

thanks for the response but where can I find that?

Reply With Quote
  #4  
Old January 31st, 2005, 08:41 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Rotating Banner

http://www.javascriptsource.com is a pretty useful site. This is probably what you want:
http://javascript.internet.com/miscellaneous/random-image-rotator.html#source

Doj

Reply With Quote
  #5  
Old February 1st, 2005, 02:09 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Rotating Banner

it worked just great! Thanks.

I also need to put links on each image. is there a way to do this.

Reply With Quote
  #6  
Old February 1st, 2005, 06:14 AM
spud spud is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Melbourne, Australia
Posts: 163 spud User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Rotating Banner

this should really be in the client-side forum, but here's the code.

Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Robert Bui (astrogate@hotmail.com) -->
<!-- Web Site:  http://astrogate.virtualave.net -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var interval = 2.5; // delay between rotating images (in seconds)
var random_display = 1; // 0 = no, 1 = yes
interval *= 1000;

var image_index = 0;
var link_index = 0;
image_list = new Array();
link_list = new Array();
image_list[image_index++] = new imageItem("http://javascript.internet.com/img/image-cycler/01.jpg");
image_list[image_index++] = new imageItem("http://javascript.internet.com/img/image-cycler/02.jpg");
image_list[image_index++] = new imageItem("http://javascript.internet.com/img/image-cycler/03.jpg");
image_list[image_index++] = new imageItem("http://javascript.internet.com/img/image-cycler/04.jpg");

link_list[link_index++] = "http://www.something.com";
link_list[link_index++] = "http://www.somethingelse.com";
link_list[link_index++] = "http://www.anotherthing.com";
link_list[link_index++] = "http://www.ohlook, number 4.com";

var number_of_image = image_list.length;
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}
function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}
function generate(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
}
function getNextImage() {
if (random_display) {
image_index = generate(0, number_of_image-1);
}
else {
image_index = (image_index+1) % number_of_image;
}
var new_image = get_ImageItemLocation(image_list[image_index]);
return(new_image);
}
function rotateImage(place,anchor) {
var new_image = getNextImage();
document[place].src = new_image;
document.getElementById("rLink").href = link_list[image_index];
var recur_call = "rotateImage('"+place+"')";
setTimeout(recur_call, interval);
}
//  End -->
</script>
</HEAD>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag  -->

<BODY OnLoad="rotateImage('rImage','rLink')">

<!-- STEP THREE: Copy this code into the BODY of your HTML document  -->

<center>
<a id="rLink" href="">
<img name="rImage" src="http://javascript.internet.com/img/image-cycler/01.jpg" width=120 height=90>
</a>
</center>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  2.29 KB -->

Reply With Quote
  #7  
Old February 1st, 2005, 07:47 PM
MIO MIO is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Downey, CA
Posts: 12 MIO User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Rotating Banner

Thanks so much. This is my personal hobby website. We don't even charge for the banners, they are just friends of mine. This is a weekend project company.

You guys have been such a great help!!!!

I just have one last question...

How can I have the link open in a new window?

Thanks Again
Jose

Reply With Quote
  #8  
Old February 2nd, 2005, 05:19 AM
System System is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 665 System User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Message Moved

Thread moved from 'PHP Coding' to 'Client Side Things' by tkarkkainen.

Reason:

Reply With Quote
  #9  
Old February 2nd, 2005, 05:27 AM
spud spud is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Melbourne, Australia
Posts: 163 spud User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Rotating Banner

<a id="rLink" target="_new" href="">

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Rotating Banner


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway