30 users online (1 members and 29 guests)  


Page 7 of 7 First ... 3 4 5 6 7
  Results 91 to 97 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. #91
    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 thereTrapmac,

    this CSS...
    Code:
    
    #quote {
        position:relative;
        width:860px;
        height:120px;
        padding:20px 10px;
        margin:auto;
        border:1px solid #ce6f0a;
        box-shadow:5px 5px 5px #999;
        font-family:georgia,times,serif;
        overflow:hidden;
     }
    ...will fix the height and hide the excess content.

    Is that what you want?

    Or am I still misunderstanding your requirements?

  2. #92
    AT76's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2014
    Posts
    2

    Re: Rotating Text/Quotes Script?

    Hello Coothead

    I get a page on a site that I'm trying to add a rotating script to. the area to paste script removes lines.

    I paste


    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "the web addy was here says can't post here">
    <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></title>

    <style type="text/css">
    #quote {
    position:relative;
    width:282px;
    padding:10px;
    font-family:georgia,times,serif;
    font-style:italic;
    font-size:14px;
    color:#ce6f0a;
    border:0 solid #000;
    background-color:#fff;
    text-align:left;
    }
    </style>

    <script type="text/javascript">

    var speed=3000; /*this is the time in milliseconds adjust to suit*/

    /* add as many quotes as you like! 'what you want' */
    var c=0;

    function showQuote() {
    quotes=[
    'Anthony is an amazing therapist, He brings your body back to life and balance. Best massage I've had in a very long time. Would highly recommend again to anybody.

    ~ Mary D. ~',

    'Hands down the best massage I've ever had. Anthony's diligence is second to none. He knew exactly what my body needed. Will certainly be receiving massages from Anthony in the future.

    ~ Shannen ~',
    'Anthony gives an incredibly good massage, appropriate firmness and very thorough. He is professional and well-trained.

    ~ Ash ~',

    'Anthony's massages are amazing! He takes time to really focus on the areas that are needed and continuosly checks in to make sure you are feeling great.

    ~ Heekyu ~',
    'Anthony relieved neck and shoulder pain immediately and relief lasted longer than after other massages. Always relaxing , unhurried and attentive to detail.

    ~ Julie ~',
    'Anthony does a great massage. He is thorough and tends to all of my achy muscles. He does especially great back work.

    ~ Brian ~',
    'Very good pressure and did a nice job with assessing and following up on muscle tendon issues I've been experiencing. Great Massage!

    ~ Laura ~',
    /* 'This is quote number eight',
    'This is quote number nine',
    'This is quote number ten'*/
    ];
    c++;
    if(c==quotes.length) {
    c=0;
    }
    document.getElementById('quote').firstChild.nodeValue=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">This is quote number one</div>

    </body>
    </html>
    </p>



    [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]

    it saves as


    <script type="text/javascript">// <![CDATA[
    var speed=3000; /*this is the time in milliseconds adjust to suit*/

    /* add as many quotes as you like! 'what you want' */
    var c=0;

    function showQuote() {
    quotes=[
    'Anthony is an amazing therapist, He brings your body back to life and balance. Best massage I've had in a very long time. Would highly recommend again to anybody.

    ~ Mary D. ~',

    'Hands down the best massage I've ever had. Anthony's diligence is second to none. He knew exactly what my body needed. Will certainly be receiving massages from Anthony in the future.

    ~ Shannen ~',
    'Anthony gives an incredibly good massage, appropriate firmness and very thorough. He is professional and well-trained.

    ~ Ash ~',

    'Anthony's massages are amazing! He takes time to really focus on the areas that are needed and continuosly checks in to make sure you are feeling great.

    ~ Heekyu ~',
    'Anthony relieved neck and shoulder pain immediately and relief lasted longer than after other massages. Always relaxing , unhurried and attentive to detail.

    ~ Julie ~',
    'Anthony does a great massage. He is thorough and tends to all of my achy muscles. He does especially great back work.

    ~ Brian ~',
    'Very good pressure and did a nice job with assessing and following up on muscle tendon issues I've been experiencing. Great Massage!

    ~ Laura ~',
    /* 'This is quote number eight',
    'This is quote number nine',
    'This is quote number ten'*/
    ];
    c++;
    /*if(c==quotes.length) {
    c=0;*/
    }
    document.getElementById('quote').firstChild.nodeValue=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>
    </p>
    <div id="quote">This is quote number one</div>

    and does nothing

  3. #93
    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 AT76,

    and a warm welcome to these forums.

    Try it like this...
    Code:
    
    <!DOCTYPE html>
    <html lang="en">
    <head>
    
    <meta charset="utf-8">
    
    <title>untitled document</title>
    
    <style>
    #quote {
        position:relative;
        width:282px;
        padding:10px;
        font-family:georgia,times,serif;
        font-style:italic;
        font-size:14px;
        color:#ce6f0a;
        border:0 solid #000;
        background-color:#fff;
        text-align:left;
        cursor:pointer;
     }
    </style>
    
    <script>
    (function() {
       'use strict';
    
       var speed=3000; /*this is the time in milliseconds adjust to suit*/
    
    /* add as many quotes as you like! 'what you want' */
    
       var quotes=[
        '<p>Anthony is an amazing therapist, He brings your body back to life and balance. Best massage I\'ve had in a very long time. Would highly recommend again to anybody.<\/p>'+
        '<h4>~ Mary D. ~<\/h4>',
    
        '<p>Hands down the best massage I\'ve ever had. Anthony\'s diligence is second to none. He knew exactly what my body needed. Will certainly be receiving massages from Anthony in the future.<\p>'+
        '<h4>~ Shannen ~<\/h4>',
    
        '<p>Anthony gives an incredibly good massage, appropriate firmness and very thorough. He is professional and well-trained.<\/p>'+
        '<h4>~ Ash ~<\/h4>',
    
        '<p>Anthony\'s massages are amazing! He takes time to really focus on the areas that are needed and continuosly checks in to make sure you are feeling great.<\/p>'+
        '<h4>~ Heekyu ~<\/h4>',
     
        '<p>Anthony relieved neck and shoulder pain immediately and relief lasted longer than after other massages. Always relaxing , unhurried and attentive to detail.</p>'+
        '<h4>~ Julie ~<\/h4>',
    
        '<p>Anthony does a great massage. He is thorough and tends to all of my achy muscles. He does especially great back work.<\/p>'+
        '<h4>~ Brian ~<\h4>',
    
        '<p>Very good pressure and did a nice job with assessing and following up on muscle tendon issues I\'ve been experiencing. Great Massage!<\/p>'+
        '<h4>~ Laura ~<\/h4>'
                  ];
       var c=0;
       var obj;
       var sto;
    
    function showQuote() {
       c++;
    if(c==quotes.length) {
       c=0;
     }
       obj.innerHTML=quotes[c];
       obj.className='bgc'+c;
       sto=setTimeout(function(){showQuote()},speed);
     }
    function pause() {
       obj=document.getElementById('quote');
       obj.onmouseover=function() {
       clearTimeout(sto);
     }
       obj.onmouseout=function() {
       sto=setTimeout(function(){showQuote()},speed);
      }
     }
       window.addEventListener?
       window.addEventListener('load',function(){pause();setTimeout(function(){showQuote()},speed);},false):
       window.attachEvent('onload',function(){pause();setTimeout(function(){showQuote()},speed);});
    })();
    </script>
    
    </head>
    <body>
    
    <div id="quote">
    <p>
    Anthony is an amazing therapist, He brings your body back to life and balance. 
    Best massage I've had in a very long time. Would highly recommend again to anybody.
    </p>
    <h4>~ Mary D. ~</h4>
    </div>
    
    </body>
    </html>

  4. #94
    AT76's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2014
    Posts
    2

    Re: Rotating Text/Quotes Script?

    [QUOTE=coothead;41287]Hi there AT76,
    [indent]
    and a warm welcome to these forums.

    Try it like this...


    Thank you been years since I wrote any code it stripped some away but enough stayed for it to work

  5. #95
    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. #96
    juspar's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2015
    Posts
    1

    Re: Rotating Text/Quotes Script?

    Coothead, thank you SO much for all the free and helpful info you've given here. I've used several of the versions you have posted, and I can successfully get what I'm looking for, except for the addition of an image of the quote (testimonial) source. Most of the versions I used I got the text of the img tag showing, but not parsing as html, at the point I gave up though I can't even get a rotation. Can you suggest how I'm messing up your java? (And be gentle on the CSS, it needs some work but I can get there eventually.

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    
    <meta charset="utf-8">
    
    <title>untitled document</title>
    
    <style>
    #quote {
        position:relative;
        width:282px;
        padding:10px;
        font-family:Verdana, Geneva, sans-serif;
        font-size:14px;
        color:#666;
        border:0 solid #000;
        background-color:#fff;
        text-align:left;
        cursor:pointer;
     }
     
    .user {
    	   float:left;
       }
        
    </style>
    
    <script>
    (function() {
       'use strict';
    
    
    /********************************************* edit these values to suit *********************************************/
    
      var quote=[
     			'<img class="quotes" src="images/keck1.png" />This is testimonial number one',
    			'<img class="quotes" src="images/feltner1.png" />This is testimonial number two',
    			'<img class="quotes" src="images/sirota1.png" />This is testimonial number three'
    			];
    
      var speed=5000; /*  this is the time between quotes in miliseconds. 5000ms = 5 seconds */
    
    /*********************************************************************************************************************/
       var c=0;
       var obj;
       var sto;
    
    function showQuote() {
       c++;
    if(c==quotes.length) {
       c=0;
     }
       obj.innerHTML=quotes[c];
       obj.className='bgc'+c;
       sto=setTimeout(function(){showQuote()},speed);
     }
    function pause() {
       obj=document.getElementById('quote');
       obj.onmouseover=function() {
       clearTimeout(sto);
     }
       obj.onmouseout=function() {
       sto=setTimeout(function(){showQuote()},speed);
      }
     }
       window.addEventListener?
       window.addEventListener('load',function(){pause();setTimeout(function(){showQuote()},speed);},false):
       window.attachEvent('onload',function(){pause();setTimeout(function(){showQuote()},speed);});
    })();
    </script>
    
    </head>
    <body>
    
    <div id="quote">
    This is testimonial number one
    </div>
    
    </body>
    </html>

  7. #97
    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 juspar,

    and a warm welcome to these forums.

    Nothing wrong with the code other than...
    var quote=[
    ... does not match...
    if(c==quotes.length) {[

    Just to be safe, I have corrected the code for you...
    Code:
    
    <!DOCTYPE html>
    <html lang="en">
    <head>
    
    <meta charset="utf-8">
    
    <title>untitled document</title>
    
    <style>
    #quote {
        position:relative;
        width:282px;
        padding:10px;
        font-family:Verdana, Geneva, sans-serif;
        font-size:14px;
        color:#666;
        border:0 solid #000;
        background-color:#fff;
        text-align:left;
        cursor:pointer;
     }
    .user {
        float:left;
       }   
    </style>
    
    <script>
    (function() {
       'use strict';
    
    /************************************* edit these values to suit *************************************/
    
      var quotes=[
                 '<img class="quotes" src="images/keck1.png" alt="">This is testimonial number one',
                 '<img class="quotes" src="images/feltner1.png" alt="">This is testimonial number two',
                 '<img class="quotes" src="images/sirota1.png" alt="">This is testimonial number three'
                ];
    
      var speed=5000; /*  this is the time between quotes in miliseconds. 5000ms = 5 seconds */
    
    /****************************************************************************************************/
       var c=0;
       var obj;
       var sto;
    
    function showQuote() {
       c++;
    if(c==quotes.length) {
       c=0;
     }
       obj.innerHTML=quotes[c];
       obj.className='bgc'+c;
       sto=setTimeout(function(){showQuote()},speed);
     }
    function pause() {
       obj=document.getElementById('quote');
       obj.onmouseover=function() {
       clearTimeout(sto);
     }
       obj.onmouseout=function() {
       sto=setTimeout(function(){showQuote()},speed);
      }
     }
       window.addEventListener?
       window.addEventListener('load',function(){pause();setTimeout(function(){showQuote()},speed);},false):
       window.attachEvent('onload',function(){pause();setTimeout(function(){showQuote()},speed);});
    })();
    </script>
    
    </head>
    <body>
    
    <div id="quote">
    <img class="quotes" src="images/keck1.png" alt="">
    This is testimonial number one
    </div>
    
    </body>
    </html>



Page 7 of 7 First ... 3 4 5 6 7

Tags for this Thread