37 users online (0 members and 37 guests)  


Page 5 of 7 First 1 2 3 4 5 6 7 Last
  Results 61 to 75 of 97

Related

  1. How to turn off magic quotes in PHP ?    Forum: PHP Forum
    Replies: 0
  2. Need html text script help    Forum: HTML Forum
    Replies: 2
  3. Rotating text load immediately?    Forum: Javascript Forum
    Replies: 4
  4. Rotating quotes script - help please    Forum: Website Scripts Forum
    Replies: 0
  1. #61
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: Rotating Text/Quotes Script?

    Hi there jmark,

    I am sorry that I missed your post.

    Still, better late than never.

    Have a look at this example, it may suit your requirements...
    Code:
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    
    <title>Rotating Quotes</title>
    
    <style type="text/css">
    #container {
        width:20em;
        padding:1em;
        border:1px solid #ccc;
        margin:auto;
        overflow:hidden;
     }
    #quote {
        font-style:oblique;
     }
    #author {
        margin:0.5em 1.5em 0.5em 0 ;
        font-family:'times new roman',serif;
        text-align:right;
     }
    </style>
    
    <script type="text/javascript">
    
    /********************************************* edit these values to suit *********************************************/
    
      var quotes=[
                   '"This is quote number one",author one',
                   '"This is quote number two",author two',
                   '"This is quote number three",author three',
                   '"This is quote number four",author four',
                   '"This is quote number five",author five',
                   '"This is quote number six",author six',
                   '"This is quote number seven",author seven',
                   '"This is quote number eight",author eight',
                   '"This is quote number nine",author nine',
                   '"This is quote number ten",author ten'
                  ];
    
      var speed=5000; /*  this is the time between quotes in miliseconds. 5000ms = 5 seconds */
    
    /*********************************************************************************************************************/
    
     var temp=null;
    function showQuote() {
       obj1=document.getElementById('quote');
       obj2=document.getElementById('author');
    
       num=Math.floor(Math.random()*quotes.length);
    if(num==temp){
       showQuote();
     }
    else{
       temp=num;
       obj1.firstChild.nodeValue=quotes[num].split(',')[0];
       obj2.firstChild.nodeValue=quotes[num].split(',')[1];
    
      setTimeout(function(){showQuote()},speed);
      }
     }
    
    if(window.addEventListener){
       window.addEventListener('load',showQuote,false);
     }
    else { 
    if(window.attachEvent){
       window.attachEvent('onload',showQuote);
      }
     }
    </script>
    
    </head>
    <body>
    
    <div id="container">
    
    <div id="quote">&nbsp;</div>
    
    <div id="author">&nbsp;</div>
    
    </div>
    
    </body>
    </html>
    

  2. #62
    jmark's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2010
    Posts
    3

    Re: Rotating Text/Quotes Script?

    Many thanks
    What about loading this script from *.js file? Is it possible?
    Because this would help to avoid putting the same javascript in every html file.

  3. #63
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: Rotating Text/Quotes Script?

    Hi there jmark,

    of course, the javascript can be placed in an external file and so can the css.
    1. Cut this....
      Code:
      
      /********************************************* edit these values to suit *********************************************/
      
        var quotes=[
                     '"This is quote number one",author one',
                     '"This is quote number two",author two',
                     '"This is quote number three",author three',
                     '"This is quote number four",author four',
                     '"This is quote number five",author five',
                     '"This is quote number six",author six',
                     '"This is quote number seven",author seven',
                     '"This is quote number eight",author eight',
                     '"This is quote number nine",author nine',
                     '"This is quote number ten",author ten'
                    ];
      
        var speed=5000; /*  this is the time between quotes in miliseconds. 5000ms = 5 seconds */
      
      /*********************************************************************************************************************/
      
       var temp=null;
      function showQuote() {
         obj1=document.getElementById('quote');
         obj2=document.getElementById('author');
      
         num=Math.floor(Math.random()*quotes.length);
      if(num==temp){
         showQuote();
       }
      else{
         temp=num;
         obj1.firstChild.nodeValue=quotes[num].split(',')[0];
         obj2.firstChild.nodeValue=quotes[num].split(',')[1];
      
        setTimeout(function(){showQuote()},speed);
        }
       }
      
      if(window.addEventListener){
         window.addEventListener('load',showQuote,false);
       }
      else { 
      if(window.attachEvent){
         window.attachEvent('onload',showQuote);
        }
       }
      
    2. Paste it into NotePad.
    3. Click "File" and "Save As..."
    4. Give the file a name and extension - let's say quotes.js
    5. Select the required directory from the "Save in" box.
    6. Click "Save".
    7. Change this...
      Code:
      
      <script type="text/javascript">
      
      </script>
      
    8. To this...
      Code:
      
      <script type="text/javascript" src="quotes.js"></script>
      


    I hope that this helps.

  4. #64
    jmark's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2010
    Posts
    3

    Re: Rotating Text/Quotes Script?

    God bless you, thanks a million

  5. #65
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: Rotating Text/Quotes Script?

    No problem, you're very welcome.

  6. #66
    pb9000's Avatar
    New User

    Status
    Offline
    Join Date
    May 2010
    Posts
    1

    Re: Rotating Text/Quotes Script?

    I am looking for html code that will allow me to have rotating quotes over a color background. I would like it to be 14pt type in white so that I can see it over the color background. Can someone help with this? Thanks.

  7. #67
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: Rotating Text/Quotes Script?

    Hi there pb9000,

    and a warm welcome to these forums.

    This thread contains various examples of rotating quote scripts.

    Find the one that suits your requirements then set the appropriate font and background-color values in the CSS section.

    If you find that this is beyond your present skill level then let us know and we will try and help you.

  8. #68
    whiteweazel21's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2010
    Posts
    1

    Re: Rotating Text/Quotes Script?

    Woops, wrong place o.o

  9. #69
    murphtall's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2010
    Posts
    1

    Unhappy Re: Rotating Text/Quotes Script?

    I wonder what I am doing wrong here? Can anyone help? Thnaks Guys!!!

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <title>Rotating Quotes</title>
    
    <style type="text/css">
    body {
    color:#000;
    background-color:#aaa;
    }
    #quote {
    margin:50px auto;
    font-family:verdana,arial,helvetica,sans-serif;
    font-size:10px;
    color:#000;
    width:300px;
    line-height:40px;
    border:1px solid #000;
    background-color:#fff;
    text-align:center;
    }
    </style>
    
    <script type="text/javascript">
    
    var quotes=[
     				'Make it a practice to wash your hands before touching your tattoo. This will greatly reduce the chance of introducing germs to the open skin and launching an infection.', 
     				'Wash your new tattoo two or three times each day. Choose a gentle soap, such as Johnson\'s Baby Soap, Baby Magic Bath Lotion or Ivory Soap. Your tattoo artist may recommend an anti-bacterial soap, and you can use this if you like' but nearly any gentle soap will kill germs. Baby products are less likely to strip the skin of its natural oils' even with frequent washing.',
     				'Smooth the soap on with clean fingers, not a washcloth. Washcloths' even velour ones' still have an abrasive effect on the skin, and this can leave your tattoo feeling raw and delay healing. It\'s far better to lightly work the soap over the tattoo in a circular motion. If it tickles a bit, you're using the right amount of pressure.',
     				'Rinse the soap off under running water. Again' avoid using a washcloth to remove the soapy water. Letting clean' lukewarm water run over the area carries away all the soap and germs.',
     				'Do not rub your fresh tattoo dry. The best way to dry your tat is to let it air dry. If you don't have the time to do that' you can gently pat it dry with a soft towel. An even better technique is to cover it with a clean paper towel and let it wick up the moisture on its own. This will only take a few moments and is well worth the time.',
     				'Cover your tattoo with a fresh bandage if needed. Most artists only recommend keeping your new tat bandaged for the first couple of hours after tattooing in order to soak up the worst of the bleeding. However' a new tat can continue to weep fluid for a few days' especially if the air can't get to it. If your tat weeps enough to run, rebandage it and ask your artist or physician to look at it to determine if an infection is starting. If all seems well' let fresh oxygen do its healing job.',
     				'Resist the urge to pick at any scabs that may form. This is one of the best tattooed skin care tips you\'ll ever get, as scarring can devastate that artwork you went through so much to get.',
     				'Apply a small amount of a color free, scent free moisturizing lotion to the area. You are more likely to find a nice bland lotion in a health supply store than in a cosmetics aisle. The dyes in colored lotions can affect your ink tints' and scent oils used can be harsh on open skin.',
     				'You can choose to use an antibiotic ointment on your tat if your artist recommends it, but it\'s not usually necessary. Washing your tat two or three times a day should be sufficient for killing germs.',
     				'No matter which lotion or ointment you use, apply it sparingly. A thick layer of moisturizer can leach color out of your tattoo. If your skin feels excessively greasy after an application, gently pat up the extra with a soft tissue.',
     				'Apply a thin layer of SPF 50 sunblock lotion over the tattoo, and reapply often.',
     				'Wear a light garment over your tat for even better protection. Go ahead and combine this effort with the sunblock. When it comes to sun exposure, you really can't be too careful.',
     				'Never forget to apply sunblock to a tattoo of any age. Even seasoned tattoos can be affected by the sun, and a sunburn can cause peeling and scarring, neither of which are any good for the look of your tat.',
    
    ];
    
    function showQuote() {
    document.getElementById("quote").firstChild.nodeValue=
    quotes[Math.floor(Math.random()*quotes.length)];
    }
    
    if(window.addEventListener){
    window.addEventListener('load',showQuote,false);
    }
    else { 
    if(window.attachEvent){
    window.attachEvent('onload',showQuote);
    }
    }
    </script>
    
    </head>
    <body>
    
    <div id="quote">&nbsp;</div>
    
    </body>
    </html>

  10. #70
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: Rotating Text/Quotes Script?

    Hi there murphtall,

    and a warm welcome to these forums.
    I wonder what I am doing wrong here?
    Your formation of the quotes caused a few scripting errors.

    Try this corrected version...
    Code:
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    
    <title>Rotating Quotes</title>
    
    <style type="text/css">
    body {
        background-color:#aaa;
    }
    #quote {
        width:60em;
        padding:0.8em;
        border:0.2em solid #333;
        margin:2em auto 0;
        font-family:verdana,arial,helvetica,sans-serif;
        font-size:0.8em;
        color:#333;
        background-color:#fff;
     }
    </style>
    
    <script type="text/javascript">
    
    var quotes=[
               'Make it a practice to wash your hands before touching your tattoo. This will greatly reduce the chance of introducing germs to the open skin and launching an infection.', 
     	   'Wash your new tattoo two or three times each day. Choose a gentle soap, such as Johnson\'s Baby Soap, Baby Magic Bath Lotion or Ivory Soap. Your tattoo artist may recommend an anti-bacterial soap, and you can use this if you like but nearly any gentle soap will kill germs. Baby products are less likely to strip the skin of it\'s natural oils even with frequent washing.',
     	   'Smooth the soap on with clean fingers, not a washcloth. Washcloths, even velour ones, still have an abrasive effect on the skin, and this can leave your tattoo feeling raw and delay healing. It\'s far better to lightly work the soap over the tattoo in a circular motion. If it tickles a bit, you\'re using the right amount of pressure.',
     	   'Rinse the soap off under running water. Again, avoid using a washcloth to remove the soapy water. Letting clean, lukewarm water run over the area carries away all the soap and germs.',
     	   'Do not rub your fresh tattoo dry. The best way to dry your tat is to let it air dry. If you don\'t have the time to do that, you can gently pat it dry with a soft towel. An even better technique is to cover it with a clean paper towel and let it wick up the moisture on its own. This will only take a few moments and is well worth the time.',
     	   'Cover your tattoo with a fresh bandage if needed. Most artists only recommend keeping your new tat bandaged for the first couple of hours after tattooing in order to soak up the worst of the bleeding. However, a new tat can continue to weep fluid for a few days, especially if the air can\'t get to it. If your tat weeps enough to run, rebandage it and ask your artist or physician to look at it to determine if an infection is starting. If all seems well, let fresh oxygen do its healing job.',
     	   'Resist the urge to pick at any scabs that may form. This is one of the best tattooed skin care tips you\'ll ever get, as scarring can devastate that artwork you went through so much to get.',
     	   'Apply a small amount of a color free, scent free moisturizing lotion to the area. You are more likely to find a nice bland lotion in a health supply store than in a cosmetics aisle. The dyes in colored lotions can affect your ink tints and scent oils used can be harsh on open skin.',
     	   'You can choose to use an antibiotic ointment on your tat if your artist recommends it, but it\'s not usually necessary. Washing your tat two or three times a day should be sufficient for killing germs.',
     	   'No matter which lotion or ointment you use, apply it sparingly. A thick layer of moisturizer can leach color out of your tattoo. If your skin feels excessively greasy after an application, gently pat up the extra with a soft tissue.',
     	   'Apply a thin layer of SPF 50 sunblock lotion over the tattoo, and reapply often.',
     	   'Wear a light garment over your tat for even better protection. Go ahead and combine this effort with the sunblock. When it comes to sun exposure, you really can\'t be too careful.',
     	   'Never forget to apply sunblock to a tattoo of any age. Even seasoned tattoos can be affected by the sun, and a sunburn can cause peeling and scarring, neither of which are any good for the look of your tat.'
               ];
    
    function showQuote() {
       document.getElementById("quote").firstChild.nodeValue=
       quotes[Math.floor(Math.random()*quotes.length)];
     }
    
     window.addEventListener?
     window.addEventListener('load',showQuote,false):
     window.attachEvent('onload',showQuote);
    
    </script>
    
    </head>
    <body>
    
    <div id="quote">&nbsp;</div>
    
    </body>
    </html>
    

  11. #71
    Oldbull's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2011
    Location
    No. California
    Posts
    2

    Re: Rotating Text/Quotes Script?

    First I would like to say the support shared here is wonderful. Our world could learn from this forum.
    Coothead you are awesome.
    I'm new to website construction and this forum. I've tried following the instructions here to create an external .js that would post quotes on my webpages. I so far have been unsuccessful. I was using a script I found online which works great when everything is placed on the page but when I separate thing and try to draw on the external file I get a blank page. Here's what the working page looks like;
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Sharing Good News</title>


    <font face="Arial, Helvetica, sans-serif"></font><link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
    <style type="text/css">
    a { text-decoration:none }
    </style>


    <script
    language="JavaScript" type="Text/Javascript"><!--
    // Hide script from older browsers
    var urlAddress = "http://www.hypergurl.com/randomquote.html";
    var pageName = "Random quote javascript";

    function addToFavorites()
    {
    if (window.external)
    {
    window.external.AddFavorite(urlAddress,pageName)
    }
    else
    {
    alert("Sorry! Your browser doesn't support this function.");
    }
    }
    // -->
    </script>


    </head>

    <body bgcolor="#FFFFFF" alink="#FFFFFF" vlink="#FFFFFF" topmargin="0" leftmargin="0" rightmargin="0">
    <table width="99%" border="0" cellspacing="0" cellpadding="0">
    <tr valign="top">
    <th bgcolor="#FFFFFF" width="43%" scope="col">
    <div align="left"><img src="share2.gif" width="103" height="95"/></div></th>
    <th bgcolor="#FFFFFF" width="57%" scope="col">
    <div align="left"><p style="font: 13pt/14pt Arial, Helvetica;color:#000000;"><span style="font-style:italic"><script language="JavaScript">
    <!-- Distributed by http://www.hypergurl.com
    var howMany = 50
    var quote = new Array(howMany+1)
    quote[0]="I believe in the kingdom come. Then all the colors will bleed into one. - Bono"
    quote[1]="Your mind is a tool you can choose to use any way you wish. Louise L. Hay"
    quote[2]="The words that enlighten the soul are more precious than jewels."
    quote[3]="Prepare yourself to receive the best that life has to offer."
    quote[4]="Love is you. You and me. Love is knowing, We can be. John Lennon"
    quote[5]="Never travel faster than your guardian angel can fly. Mother Teresa"
    quote[6]="No one can make you feel inferior without your consent."
    quote[7]="With a little luck we can help it out. We can make this whole damn thing work out. Paul McCartney"
    quote[8]="Shoot for the moon. Even if you miss, you'll land among the stars."
    quote[9]="Only a life lived for others is a life worthwhile. Albert Einstein"
    quote[10]="Prayer in action is love, love in action is service. Mother Teresa"
    quote[11]="An invasion of armies can be resisted, but not an idea whose time has come."
    quote[12]="The person born with a talent they are meant to use will find their greatest happiness in using it. - Johann Wolfang von Goethe"
    quote[13]="I get by with a little help from my friends. - Lennon/McCartney"
    quote[14]="Love is the immortal flow of energy that nourishes, extends and preserves. Its eternal goal is life."
    quote[15]="Sometimes the heart sees what is invisible to the eye."
    quote[16]="Happiness is when what you think, what you say, and what you do are in harmony. - Mohandas Gandhi"
    quote[17]="Action may not bring happiness but there is no happiness without action. - William James"
    quote[18]="But in the end, you've got to become the change you want to see in the world. Bono"
    quote[19]="Happiness is the meaning and purpose of life, the whole aim and end of human existence. - Aristotle"
    quote[20]="Knowing something is not as good as liking it. Liking something is not as good as rejoicing in it. - Confucius"
    quote[21]="The force of spirit is ever progressive and endless. - Mahatma Gandhi"
    quote[22]="Believe that life is worth living and your belief will help create the fact."
    quote[23]="If one speaks or acts with a pure mind, happiness follows like a shadow. - Buddha"
    quote[24]="What can you do to promote world peace? Go home and love your family. Mother Teresa"
    quote[25]="To live a pure unselfish life, one must count nothing as one's own in the midst of abundance."
    quote[26]="Freedom of the individual is at the root of all progress. - Mahatma Gandhi"
    quote[27]="You'll see it when you believe it. Dr. Wayne Dyer"
    quote[28]="The willow turns his back on inclement weather. And if he can do it, we can do it just me and you. Paul McCartney"
    quote[29]="God does not play dice with the universe. - Albert Einstein"
    quote[30]="If we have no peace, it is because we have forgotten that we belong to each other. Mother Teresa"
    quote[31]="If you want your children to be intelligent, read them fairy tales. If you want them to be more intelligent, read them more fairy tales. Albert Einstein"
    quote[32]="Love is a better master than duty. - Albert Einstein"
    quote[33]="Love who and what you are and what you do. Louise L. Hay"
    quote[34]="Choose the life that is most useful, and habit will make it the most agreeable."
    quote[35]="There is no way to happiness. Happiness is the way. Dr. Wayne Dyer"
    quote[36]="Everytime you smile at someone, it is an action of love, a gift to that person, a beautiful thing. Mother Teresa"
    quote[37]="And this wise man asked me to stop. He said, Stop asking God to bless what you're doing. Get involved in what God is doing because it's already blessed. - Bono"
    quote[38]="Don't be afraid to take a big step when one is indicated. You can't cross a chasm in two small steps."
    quote[39]="When someone does something good, Applaud! You will make two people happy."
    quote[40]="Heaven on Earth is a choice you must make, not a place we must find. Dr. Wayne Dyer"
    quote[41]="Any man who can drive safely while kissing a pretty girl is simply not giving the kiss the attention it deserves. Albert Einstein"
    quote[42]="Do not wait for extrordinary circumstances to do good; try to use ordinary situations."
    quote[43]="All you need is Love. - Lennon/McCartney"
    quote[44]="Love is always the answer to healing of any sort. Louise L. Hay"
    quote[45]="I am realistic, I expect miracles. Dr. Wayne Dyer"
    quote[46]="There is no end to what we can do together. Paul McCartney"
    quote[47]="Never believe all you hear. Always believe in what you say."
    quote[48]="All the Worlds a Birthday Cake so take a piece but not too much. - George Harrison"
    quote[49]="Reach high, for stars lie hidden in your soul. Dream deep, for every dream precedes the goal. Mother Teresa"
    quote[50]="Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world. Albert Einstein"
    function rndnumber(){
    var randscript = -1
    while (randscript < 0 || randscript > howMany || isNaN(randscript)){
    randscript = parseInt(Math.random()*(howMany+1))
    }
    return randscript
    }
    quo = rndnumber()
    quox = quote[quo]
    document.write(quox)
    // End -->
    </script></span></p></div></th>
    </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <th bgcolor="#CC99CC" width="55%" align="left" cellspacing="0" cellpadding="0" ><img src="newlinkbar.gif" width="529" height="18" border="0" usemap="#NewLinkBar" /></th>
    <th bgcolor="#CC99CC" width="40%" cellspacing="0" cellpadding="0" ><font color="#FFFFFF" size="-1" face="Arial, Helvetica">
    <script language = "JavaScript" >
    var now = new Date();
    var dayNames = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
    var monNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
    document.write(" "+ dayNames[now.getDay()] + " " + monNames[now.getMonth()] + " " + now.getDate() + ", " + now.getFullYear());
    </script>
    </font>&nbsp;</th>
    </tr>
    </table>
    <table width="100%" border="1" bordercolor="#FFFFFF" cellspacing="0" cellpadding="0">
    <tr>
    <th>
    </th></tr>

    </table>
    <table width="100%" align="center" cellspacing="0" cellpadding="10">
    <tr valign="top">
    <td width="70%" bgcolor="#FFFFFF" valign="top" align="left" ><div align="justify">&nbsp;</div>
    </td>
    <td width="30%" bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    </table>
    <map name="NewLinkBar" id="NewLinkBar"><area shape="rect" coords="14,2,71,18" href="index.html" target="_self" alt="Home" />
    <area shape="rect" coords="74,2,128,19" href="news.html" target="_self" alt="News" />
    <area shape="rect" coords="133,2,226,18" href="rolemodels.html" target="_self" alt="Role Models" />
    <area shape="rect" coords="233,2,294,20" href="shares.html" target="_self" alt="Shares" />
    <area shape="rect" coords="299,2,345,19" href="join.html" target="_self" alt="Join" />
    <area shape="rect" coords="350,2,439,21" href="philosophy.html" target="_self" alt="Philosophy" />
    <area shape="rect" coords="444,2,518,22" href="contactus.html" target="_self" alt="Contact Us" />
    </map>
    </body>
    </html>
    Any pointers would be greatly appreciated.

  12. #72
    Oldbull's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2011
    Location
    No. California
    Posts
    2

    Re: Rotating Text/Quotes Script?

    It's works! I couldn't have got it without the help exchanged in this post. Thanks

  13. #73
    firestone's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2011
    Posts
    13

    Re: Rotating Text/Quotes Script?

    really glad with ur code thanks

  14. #74
    ameliajune's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2011
    Posts
    1

    Re: Rotating Text/Quotes Script?

    Fantastic script, thank you!

    Is there any way to have the quotes fade in/fade out instead of the abrupt load?

    Also why do some of the scripts list numbers before the quotes and some don't? (I'm taking JS this upcoming semester so I don't know it yet.)

    I am using this code as in a previous post because I like the separate formating for text and authors, though I'm not sure why there needs to be the <p> tags:

    <style type="text/css">
    #quote {
    position:relative;
    width:282px;
    height:260px;
    padding:20px 10px;
    border: 1px solid #ce6f0a;
    font-family:georgia,times,serif;
    }
    #text {
    margin:0 0 20px;
    font-style:italic;
    font-size:14px;
    color:#ce6f0a;
    }
    #name {
    font-family:verdana,arial,helvetica,sans-serif;
    font-size:12px;
    font-weight:bold;
    color:#cb6c07;
    }
    </style>

    <script type="text/javascript">

    var speed=10000; /*this is the time in milliseconds adjust to suit*/
    var c=0;

    function showQuote() {

    quotes=[

    '<p id="text">"Public relations has changed dramatically over the last five years, and TEST has proven to us the '+
    'value of both traditional and social media in communicating to the market. Regardless of the vehicle,'+
    'PR firms must be able to provide on-going, compelling information about their clients. *As an analyst,'+
    'I was impressed by TEST\'s skill at doing this and now as a client, I am benefiting from their ability '+
    'to gain greater visibility for our company\'s services and events."<\/p><p id="name">- John Doe<\/p>',

    '<p id="text">"TEST truly understands the media and works to deliver what we need, when we need it. I consider them '+
    'a premier PR agency for high-tech companies and don\'t hesitate to connect with them for stories, blogs, '+
    'or general industry updates."<\/p><p id="name">- John Doe<\/p>',

    '<p id="text">"It\'s important for PR firms to understand not just the technology but the market dynamics. I have '+
    'worked with TEST over the years and they understand who my readers are and what information is important '+
    'to them, bringing the right blend of technical detail and market expertise."<\/p><p id="name">- John Doe<\/p>'

    ];

    c++;
    if(c==quotes.length) {
    c=0;
    }
    document.getElementById('quote').innerHTML=quotes[c];

    setTimeout(function(){showQuote()},speed);
    }

    if(window.addEventListener){
    window.addEventListener('load',function(){setTimeout(function(){showQuote()},speed)},false);
    }
    else {
    if(window.attachEvent){
    window.attachEvent('onload',function(){setTimeout(function(){showQuote()},speed)});
    }
    }

    </script>

    </head>
    <body>

    <div id="quote">

    <p id="text">
    "Public relations has changed dramatically over the last five years, and TEST has proven to us the
    value of both traditional and social media in communicating to the market. Regardless of the vehicle,
    PR firms must be able to provide on-going, compelling information about their clients. *As an analyst,
    I was impressed by TEST's skill at doing this and now as a client, I am benefiting from their ability
    to gain greater visibility for our company's services and events."
    </p>

    <p id="name">- John Doe</p>

    </div>

    </body>
    </html>
    Last edited by ameliajune; 07-31-2011 at 07:50 PM.

  15. #75
    tierney's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2011
    Posts
    1

    Re: Rotating Text/Quotes Script?

    Hi, I copied the script for the rotating quotes. It worked fine, but it takes kind of a long time for the quotes to show up. Can anyone help me? Here is the site where I use the script.

    I appreciate your help.

    T



Page 5 of 7 First 1 2 3 4 5 6 7 Last

Tags for this Thread