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.

Website Design Forum


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



Freelance Jobs

Reply
Old 01-01-2009, 04:04 PM Index/Home page help
Experienced Talker

Posts: 42
Trades: 0
Please any help would be greatly appreciated. I am trying to make a Index/Home page that changes pictures like http://www.supraforums.com/
New to this and would love a little help. Not sure if it is in the coding or how it really works.

Note pictures change when you reload.

THANKS
thedude-tpm is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-01-2009, 04:22 PM Re: Index/Home page help
editme's Avatar
Novice Talker

Posts: 14
Name: Matt Wiseley
Location: New England, U.S.
Trades: 0
You're in luck - that web site performs the image rotation with JavaScript, so you can simply right click and view source to see the code behind it. It's a good way to get started learning JavaScript.
__________________
EditMe - Bringing the power of wikis to websites of all kinds.

Please login or register to view this content. Registration is FREE
editme is offline
Reply With Quote
View Public Profile Visit editme's homepage!
 
Old 01-01-2009, 05:34 PM Re: Index/Home page help
Brian07002's Avatar
Defies a Status

Posts: 2,162
Name: ...
Location: ...
Trades: 0
Here's the code:

Code:
<script language="JavaScript">
<!--
/*
Random Image Link Script
*/

function random_imglink(){
 var myimages=new Array()
 //specify random images below. You can have as many as you wish
 myimages[1]="rotate/1.jpg"
 myimages[2]="rotate/2.jpg"
 myimages[3]="rotate/3.jpg"
 myimages[4]="rotate/4.jpg"
 myimages[5]="rotate/5.jpg"
 myimages[6]="rotate/6.jpg"
 myimages[7]="rotate/7.jpg"
 myimages[8]="rotate/8.jpg"
 myimages[9]="rotate/9.jpg"
 myimages[10]="rotate/10.jpg"
 myimages[11]="rotate/11.jpg"
 myimages[12]="rotate/12.jpg"
 myimages[13]="rotate/13.jpg"
 myimages[14]="rotate/14.jpg"
 myimages[15]="rotate/15.jpg"
 myimages[16]="rotate/16.jpg"
 myimages[17]="rotate/17.jpg"
 myimages[18]="rotate/18.jpg"
 myimages[19]="rotate/19.jpg"
 myimages[20]="rotate/20.jpg"
 myimages[21]="rotate/21.jpg"
 myimages[22]="rotate/22.jpg"
 myimages[23]="rotate/23.jpg"
 myimages[24]="rotate/24.jpg"
 myimages[26]="rotate/26.jpg"
 myimages[27]="rotate/27.jpg"
 myimages[28]="rotate/28.jpg"
 myimages[29]="rotate/29.jpg"
 myimages[30]="rotate/30.jpg"
 myimages[31]="rotate/31.jpg"
 myimages[32]="rotate/32.jpg"
 myimages[33]="rotate/33.jpg"
 myimages[34]="rotate/34.jpg"
 myimages[35]="rotate/35.jpg"
 myimages[36]="rotate/36.jpg"
 myimages[37]="rotate/37.jpg"
 myimages[38]="rotate/38.jpg"
 myimages[39]="rotate/39.jpg"
 myimages[40]="rotate/40.jpg"
 myimages[41]="rotate/41.jpg"
 myimages[42]="rotate/42.jpg"
 myimages[43]="rotate/43.jpg"
 myimages[44]="rotate/44.jpg"
 myimages[45]="rotate/45.jpg"
 myimages[46]="rotate/46.jpg"
 myimages[47]="rotate/47.jpg"
 myimages[48]="rotate/48.jpg"
 myimages[49]="rotate/49.jpg"
 myimages[50]="rotate/50.jpg"
 myimages[51]="rotate/51.jpg"
 myimages[52]="rotate/52.jpg"
 myimages[53]="rotate/53.jpg"
 myimages[54]="rotate/54.jpg"
 myimages[55]="rotate/55.jpg"
 myimages[56]="rotate/56.jpg"
 myimages[57]="rotate/57.jpg"
 myimages[58]="rotate/58.jpg"
 myimages[59]="rotate/59.jpg"
 myimages[60]="rotate/60.jpg"
 myimages[61]="rotate/61.jpg"
 myimages[62]="rotate/62.jpg"
 myimages[63]="rotate/63.jpg"
 myimages[64]="rotate/64.jpg"
 myimages[65]="rotate/65.jpg"
 myimages[66]="rotate/66.jpg"
 myimages[67]="rotate/67.jpg"
 myimages[68]="rotate/68.jpg"
 myimages[69]="rotate/69.jpg"
 myimages[70]="rotate/70.jpg"
 myimages[71]="rotate/71.jpg"
 myimages[72]="rotate/72.jpg"
 myimages[73]="rotate/73.jpg"
 myimages[74]="rotate/74.jpg"
 myimages[75]="rotate/75.jpg"
 
 var ry=Math.floor(Math.random()*myimages.length)

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

 random_imglink()
//-->
</script>
To add more images, just keep adding like so:

Code:
myimages[76]="rotate/76.jpg"
Enjoy!
__________________
Made2Own

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

Last edited by Brian07002; 01-01-2009 at 05:36 PM..
Brian07002 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Index/Home page help
 

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.12051 seconds with 12 queries