1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

need small html code

Discussion in 'HTML & Website Design' started by ameyjah, Nov 5, 2007.

  1. #1
    your help will be definitely apreeciated.

    I need a code to display random messages. everytime any visitors visit the site, I want to display pre written random messages.
    can you provide me the code with that.
     
    ameyjah, Nov 5, 2007 IP
  2. 007wood

    007wood Banned

    Messages:
    1,500
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    007wood, Nov 5, 2007 IP
  3. t0mb

    t0mb Active Member

    Messages:
    1,116
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #3
    You can use javascript, but the problem is that the file can be viewed by anyone. I use a PHP file on my site ty4.info.

    PM if you would like the code.
     
    t0mb, Nov 5, 2007 IP
  4. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #4
    I once use this code to display various quotes randomly (or when one refreshes the page):

    <script type="text/javascript">
       //these are your quotes - we've included three
       var message = new Array(
       'I do not fear computers. I fear the lack of them. <strong style="font-size: 10px;">-Isaac Asimov</strong>',
       'Never trust a computer you can\'t throw out a window. <strong style="font-size: 10px;">-Steve Wozniak</strong>',
       'Why think? We have computers to do that for us. <strong style="font-size: 10px;">-Jean Rostand</strong>'
       );
       
       // if you want to include more quotes - increase the number three to how many you have
       var rand = Math.floor(Math.random() * 3);
       //this writes the quote to the page
       document.write('"'+message[rand]+'"');
    </script>
    Code (markup):
    tayiper
     
    tayiper, Nov 6, 2007 IP
  5. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #5
    javascript or a SSL
     
    twistedspikes, Nov 6, 2007 IP
  6. venam

    venam Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    download and edit this file:
    http://www.weberdev.com/download.php?filename=motd.zip.ber
    Code (markup):
     
    venam, Jan 15, 2008 IP