|
-
Perl scripting
I need to make several banners come up randimly and not to sure where to begin.I have the banner.cgi and the web page but not to sure where to go from there. I'm new to perl so i'm confused???
-
Ursus Arctos Moderatis
You can use the SSI command:
<!--#exec cgi="cgi-bin/banner.cgi"-->
Which will include into your web page whatever that banner.cgi returns. (You must use the .shtml file extension for the web server to recognize that command)
Or, I have a pretty quick and easy JavaScript one you could use
-
yah I'd love to use the javascript one.
that would be cool.
thanks for the help
-
Ursus Arctos Moderatis
Here ya go:
<script language="JavaScript">
var how_many_ads = 3;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
alt="Banner1";
banner="images/banner1.jpg";
width="468";
height="64";
}
if (ad==2) {
alt="Banner2";
banner="images/banner2.jpg";
width="468";
height="64";
}
if (ad==3) {
alt="Banner3";
banner="images/banner3.jpg";
width="468";
height="64";
}
document.write('<center>');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0><br>');
document.write('</center>');
</script>
Give that a shot, I think it's pretty self explanatory on what needs to be altered in order to place in your own images into the mix. Good luck with it.
-
Ya Javascript can do the trick, you can find tons of free scripts at http://javascript.internet.com
------------------
DHAHL3seasons GP:73 G:121 A:55 Pts:176 GWG:12 +/-:184
UWSWA1season GP:9 G:12 A:8 Pts:20 GWG:3 +/-:-3
uwcdc.com or namgor.com
DHAHL3seasons GP:73 G:121 A:55 Pts:176 GWG:12 +/-:184
UWSWA6seasons GP:41 G:53 A:46 Pts:99 GWG:5 +/-:-25
MCBHL3seasons GP:14 G:20 A:8 Pts:28 GWG:4 +/-:19
uwcdc.com or monkis.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|