|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Random loading banners
I have just currently added banner links to my site. But my customers are wanting them to rotate, right now it isn't a problem because there is only two. I am about to add a couple of more so it will be obvious if they are not rotating.
I just changed my hosting to windows 2000 server so my program designer could use asp for a zipcode look up and a catalog look up, and it doesn't use PHP. i don't want him to mess with this because he is expensive and i should be able to handle this. The delema is that i need them to be links as well as show the banner. I have tried it with some stuff i found on google but it would show the same image in both spots,(leaving one of my banners off the page). Any ideas on what i can do to make this work? |
|
#2
|
||||
|
||||
|
This is what I use for my banners:
PHP Code:
__________________
Cheerios! New to SEO? See the FAQ! My Disclaimer: Don't Listen To Me - I know nothing! |
|
#3
|
||||
|
||||
|
Yeah, but that's php ;)
This is very easy and works ok --> http://www.kamath.com/tutorials/tut006_adrotator.asp |
|
#4
|
||||
|
||||
|
hotscript is first page to check:
http://www.hotscripts.com/search/5612806.html |
|
#5
|
||||
|
||||
|
Quote:
lol...not designed for what he wants...but its one file and takes: <!--#include virtual="file_name.php" --> to include it on any page. The script has many, many, many very beneficial uses if you use your imagination. Ahh well. You can always check your c-panel. Sometimes the hosts will include a banner rotating script. |
|
#6
|
|||
|
|||
|
Quote:
Here you go this worked great. Make sure after every last url there it ends with only a " quote. but you can add as many banners and it will rotate them randomly. Code:
<!-- BANNER ROTATOR #1
var currentdate = 0;
var core = 0;
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
}
}
link = new initArray(
"http://www.whatever.com",
"http://www.whoever.com",
"http://www.dontknowwhereitgoes.com",
"http://www.makesurenocommaattheend.com"
);
image = new initArray(
"http://www.whatever.com/banners/whatever.gif",
"http://whoever.com/banners.whoever.gif",
"http://www.dontknowwhereitgoes.com/banners/468x60.gif",
"http://www.makesurenocommaattheend.com/banners/samething.gif"
);
text = new initArray(
"alt tags",
"alt tags",
"alt tags",
"alt tags"
"Some title you want to put here"
);
var currentdate = new Date();
var core = currentdate.getSeconds() % image.length;
var ranlink = link[core];
var ranimage = image[core];
var rantext = text[core];
document.write('<a href=\"' +ranlink+ '\"><img src=\"'+ranimage+'\" border="0" alt=\"'+rantext+'\"></a>');
// BANNER ROTATOR #1 -->
Ok its easy, add the code above to a notepad file and name it rotator.js. Ok add your link to the site the banner is going to in order, then next is the image (where the banner is), then next is the alt tags. Everything is in order from top to bottom. Make sure the last link of all 3 orders just ends in a " you will notice that all above the last one ends like this ", if you leave the comma on the last link it will not work. when you are dont formatting your .js file with your links, banners, and alt tags. All you have to do it add this code to your html page that you want to display your banners. Code:
<script type="text/javascript" src="http://www.yourdomain.com/rotator.js"></script> That code goes right into the table or wherever it is that the banner is going to be displayed on the page. upload your banners and js file and your in business. I think its pretty self explanitory but hit me up if you have any questions TP |
![]() |
| Viewing: SEO Chat Forums > Other > HTML Coding > Random loading banners |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|