SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: dreamweaver

  1. #1
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Bondi, Australia
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question dreamweaver

    Hello evreyone,
    I am building a site using dreamweaver, what i want ot do with the site is have advertising where the ad changes every three seconds to a different ad like roll over but it does it automaticly, with out the mouse going over the gif.

    Also is it possible to have a link attached to the different ads so when clicked the link jumps to the page that the ad was showing

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's perfectly possible. There are free JavaScripts lying around all over the Internet that will do this. Google will hold your answer my friend!

    G

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Bondi, Australia
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks greg

    any ideas what this is called

  4. #4
    Alt+F4= User Control ;-) rabmurdy's Avatar
    Join Date
    Mar 2002
    Location
    Ecosse
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This should do the trick:

    Code:
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    var how_many_ads = 5;
    var now = new Date()
    var sec = now.getSeconds()
    var ad = sec % how_many_ads;
    ad +=1;
    if (ad==1) {
    txt="Click here to find out more...";
    url="http://www.blahblah.co.uk/";
    alt="Use the net during the day? Can you do it for a Fiver?";
    banner="linkbanners/pic.gif";
    width="150";
    height="53";
    }
    if (ad==2) {
    txt="Click here to find out more...";
    url="http://www.yoursite.co.uk/";
    alt="Unlimited Access for serious surfers!";
    banner="linkbanners/picture_2.gif";
    width="150";
    height="53";
    }
    if (ad==3) {
    txt="Click here to find out more..."; 
    url="http://www.blahblah.co.uk/";
    alt="Downloaders Dream Connection, A Massive 5:1 Ratio to Keep You Busy All Night!";
    banner="linkbanners/picture_3.gif";
    width="150";
    height="53";
    }
    if (ad==4) {
    txt="Click here to find out more..."; 
    url="http://www.blahblah.co.uk/";
    alt="Blahblah.co.uk";
    banner="linkbanners/picture_4.gif";
    width="150";
    height="53";
    }
    if (ad==5) {
    txt="Yet another banner..."; 
    url="http://blahdeblah.com";
    alt="BlahdeBlah";
    banner="linkbanners/blahdeblah.gif";
    width="150";
    height="53";
    }
    document.write('<center>');
    document.write('<a href=""\"' + url + '\" target=\"_blank\">');
    document.write('<img src=""\"' + banner + '\" width=')
    document.write(width + ' height=' + height + ' ');
    document.write('alt=\"' + alt + '\" border=0><br>');
    document.write('<small>' + txt + '</small></a>');
    document.write('</center>');
    // End -->
    </SCRIPT>
    "If something is too hard,give it up. The moral my boy is too never try anything"
    "Just because I don't care doesn't mean I don't understand"

  5. #5
    Alt+F4= User Control ;-) rabmurdy's Avatar
    Join Date
    Mar 2002
    Location
    Ecosse
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, just realised that script will only present a new logo every time the page is loaded...


    I ain't sure how to change it every 3 seconds, maybe someone can hack that code a little to do it..
    "If something is too hard,give it up. The moral my boy is too never try anything"
    "Just because I don't care doesn't mean I don't understand"

  6. #6
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Say what you see! Banner swapping.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •