NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page help

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 11-17-2003, 11:36 AM THREAD STARTER               #1 (permalink)
First Time Poster!
Join Date: Nov 2003
Posts: 1
j9hagop is an unknown quantity at this point
 



help


I am designing this web site, it is more like an information web site but on this site there will be advertisements where they will change on there own.

So i will have 1 advertisement in a specific space and it will change to another advertisment every ten seconds, how do I write this code for 3 advertisement. Can it be done in html?? Does anyone know any resources I can use for help.

Thank you



j9hagop@yahoo.com
j9hagop is offline  
Old 11-17-2003, 12:57 PM   #2 (permalink)
NamePros Member
 
Mp)Tarh's Avatar
Join Date: Aug 2003
Location: Ontario, Canada
Posts: 98
Mp)Tarh is an unknown quantity at this point
 



You can use Javascript.

Put this in your <HEAD> tag:

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
var timeout_1;
var adnumber;
var imagenum;
adnumber = 0;
imagenum = 3;
function changead(url)
{
window.document.myimagead.src = url;
timeout_1 = setTimeout("changecom",10000);
}

function changecom()
{
adnumber = adnumber + 1;
if (adnumber == 4)
{
adnumber = 1;
}
changead("adimages/" + adnumber + ".bmp");
}
????: NamePros.com http://www.namepros.com/programming/15605-help.html
changecom();
//-->
</SCRIPT>


Change the text in bold into the extension of your files.

In the image tag that holds your ad, put in this value:

NAME="myimagead"

Put all of your images in %webpage_directory%/adimages/

Name the first image 1.***
Name the second one 2.***
Name the third one 3.***

I have not tested this code, wrote it up in a few minutes. So if anyone finds any bugs, please tell me.

P.S. You might also want to add preloading.
__________________
Yeah... I knew that. What?
Mp)Tarh is offline  
Closed Thread


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


 
All times are GMT -7. The time now is 02:06 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger