![]() |
|
|
|
||||||||||
![]() |
|
|
Thread Tools |
|
#1
|
||||
|
||||
|
Rotating sponsors image script assistance needed...
Here is what I have so far:
Very rudimentary I know, but here it is: var rand_int = Math.floor(Math.random()*4); var photos = new Array(4) photos[0] = '<img src="images/smittys-logo.gif">'; photos[1] = '<img src="images/rickys-logo.jpg">'; photos[2] = '<img src="images/rayssecurity.jpg">'; photos[3] = '<img src="images/purdys-logo.jpg">'; document.write(photos[rand_int]); This accomplishes most of what I need, EXCEPT I would like to add above the image the actual company name. eg: Team sponsored by (then company name inserted from .js here) <br> (company logo inserted here by .js) |
|
#2
|
|||
|
|||
|
You can find some more code on the topic in the thread 11620. In general, you need your own objects. For example:
Code:
function ImageInfo(url, title)
{
this.url = url;
this.title = title;
}
Code:
images.push(new ImageInfo("/images/img1.jpg", "My Title"));
Code:
img = document.getElementById("my-img-id");
img.src = images[index].url;
J.D. |
|
#3
|
||||
|
||||
|
look at phpadsnew dot com << free advertising script easy to use [ free ]
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Url friendly php gallery script needed | piniyini | PHP | 7 | Oct 25th 2005 4:35 am |
| Checking source codes of image, audio and video files | onauc | Programming | 0 | Feb 21st 2005 5:34 pm |
| Setting up a linked image series | Don Key | HTML & Website Design | 4 | Nov 23rd 2004 1:58 pm |
| Assistance needed for file transfer hosting | Ajeet | General Business | 0 | Oct 6th 2004 11:12 am |
| Smiling Streetkids - assistance needed for awareness raising campaign | Dominic | General Marketing | 14 | Jun 16th 2004 6:01 am |