Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 1356 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

Random Image Rotator

Thread title: Random Image Rotator
Closed Thread  
Page 2 of 2 < 1 2
    Thread tools Search this thread Display Modes  
04-15-2005, 09:48 AM
#11
Kayish is offline Kayish
Kayish's Avatar
Status: I'm new around here
Join date: Apr 2005
Location:
Expertise:
Software:
 
Posts: 18
iTrader: 0 / 0%
 

Kayish is on a distinguished road

  Old

Ok. I know Ill sound *really* stupid for this.. but I went to hotscripts.com and found a script Id *like* to try.. but I dont know how to download it from them or where to find it. -twirls blonde hair- I thought maybe I had to register with them to get scripts, so I registered.. but it wont let me log in. I type in the login and pass and hit log in.. and it pretty much refreshes the page. -_- Arrg. Anyways. Here is the code I have up now, that isnt working, I figured Id post it here to see if any of catch anything wrong that I missed.




Code:
<script language="JavaScript">
<!--
/*
Random Image Link Script
By Website Abstraction (http://www.wsabstract.com)
and Java-scripts.net (http://www.java-scripts.net)
*/

function random_imglink(){
  var myimages=new Array()
  //specify random images below. You can have as many as you wish
  myimages[1]="http://www.shadaeblu.disturbed-reality.net/images/cutest_kitten.gif"
  myimages[2]="http://www.shadaeblu.disturbed-reality.net/images/cyourway.gif"
  myimages[3]="http://www.shadaeblu.disturbed-reality.net/images/global_whining.gif"
  myimages[4]="http://www.shadaeblu.disturbed-reality.net/images/honr_stu.gif"
  myimages[5]=http://www.shadaeblu.disturbed-reality.net/images/may_nevr_hapn.gif
  myimages[6]="http://www.shadaeblu.disturbed-reality.net/images/picknose.gif"
  myimages[7]="http://www.shadaeblu.disturbed-reality.net/images/piece_of.gif"
  myimages[8]="http://www.shadaeblu.disturbed-reality.net/images/problm_is.gif"
  myimages[9]="http://www.shadaeblu.disturbed-reality.net/images/save_horse_cowboy.gif"
  myimages[10]="http://www.shadaeblu.disturbed-reality.net/images/squishy.gif" 
  myimages[11]="http://www.shadaeblu.disturbed-reality.net/images/too_loud.gif"
  myimages[12]="http://www.shadaeblu.disturbed-reality.net/images/whatmore.gif"
  myimages[13]="http://www.shadaeblu.disturbed-reality.net/images/bed_angry_revenge.gif"

  //specify corresponding links below
  var imagelinks=new Array()
  imagelinks[1]="http://www.internetbumperstickers.com/"
  imagelinks[2]="http://www.internetbumperstickers.com/"
  imagelinks[3]="http://www.internetbumperstickers.com/"
  imagelinks[4]="http://www.internetbumperstickers.com/"
  imagelinks[5]="http://www.internetbumperstickers.com/"
  imagelinks[6]="http://www.internetbumperstickers.com/"
  imagelinks[7]="http://www.internetbumperstickers.com/"
  imagelinks[8]="http://www.internetbumperstickers.com/"
  imagelinks[9]="http://www.internetbumperstickers.com/"
  imagelinks[10]="http://www.internetbumperstickers.com/"
  imagelinks[11]="http://www.internetbumperstickers.com/"
  imagelinks[12]="http://www.internetbumperstickers.com/"
  imagelinks[13]="http://www.internetbumperstickers.com/"

  var ry=Math.floor(Math.random()*myimages.length)

  if (ry==0)
     ry=1
     document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a>')
}

  random_imglink()
//-->
</script>

-cough- Yes, the images are from internetbumperstickers.com. Go there and browse if you are bored and want a laugh. x3

04-16-2005, 02:48 PM
#12
Koobi is offline Koobi
Koobi's Avatar
Status: Member
Join date: Apr 2005
Location:
Expertise:
Software:
 
Posts: 312
iTrader: 0 / 0%
 

Koobi is on a distinguished road

  Old

PHP based image rotator:
Pro's = Will always work no matter what browser or hand held device you're on on whatever OS.
Con's = It's server side so it won't be as fast as a client side language like JavaScript, naturally.

JavaScript based image rotator:
Pro's = It's client side, so it's pretty fast.
Con's = JavaScript can be very easily turned off from within the browser settings so there's no 100% guarantee that it will work for everyone.

Take your pick.
Here's a Random image rotator I wrote using PHP:
http://koobi-studio.com/downloads/ph...showSource.php

Directions are at the top, in the comments but if you have problems with it, let me know.




If you do use a JavaScript image rotator, consider the <noscript> tag.

Closed Thread  
Page 2 of 2 < 1 2


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed