Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Thought for the Day

  1. #1
    Join Date
    Oct 2009
    Location
    USA
    Posts
    40
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default Thought for the Day

    Hi,

    I am looking for a simple way to create a Thought for the Day on my website.

    I have many different phrases, all I would like to do is program the phrase to change every day.

    One day it will be one phrase, the next day another. Just in simple text, nothing fancy. I'm pretty new at this, so not really sure where I should start or if I even put this in the right section (If not I apologize).

    Thank you,
    Jerdy

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    jerdy (10-23-2009)

  4. #3
    Join Date
    Oct 2009
    Location
    USA
    Posts
    40
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    Cool, I'll see what I can do with that, is there a way to randomize the phrases?

    Thank you

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Sure. Which one are you using?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #5
    Join Date
    Oct 2009
    Location
    USA
    Posts
    40
    Thanks
    15
    Thanked 0 Times in 0 Posts

  7. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That one's easy. In the code (which I assume you have from its demo page):

    Code:
    <script type="text/javascript">
    
    /*//////////////////////////////////////////////////////
    * Random or Daily Quotes Script w/optional controls
    * © John Davenport Scheuer as first seen in Dynamic Drive Forums
    * http://www.dynamicdrive.com/forums - user name jscheuer1
    * This credit must remain for legal use. Ver Date: 4/1/2006
    //////////////////////////////////////////////////////*/
    
    var method=1 //Set to 1 for rotating daily, 0 for random each page load
    var firstBold=1 //Set to 1 to bold the first letter in all quotes, 0 for not
    var usecontrols=1 //Set to 1 to use controls, 0 (also uncomment style line 'A') for not
    
    ////////////BEGIN QUOTES: (Start Editing after next line)//////////
    var quotes="\
    Sed ut perspiciatis unde omnis iste n . . .
    Set the highlighted to 0 for random.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. The Following User Says Thank You to jscheuer1 For This Useful Post:

    jerdy (10-23-2009)

  9. #7
    Join Date
    Oct 2009
    Location
    USA
    Posts
    40
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    Cool, worked perfectly :-)

    I'm REALLY new at this if you can't tell lol...
    How would I insert this into my webpage? I'm using dreamweaver I'm just not sure how to save and enter it into the html code.

  10. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Unfortunately I am so far removed from using WYSIWYG editors like DW that I can't help much there. My best suggestion would be to make your page in DW without the script, its styles, or any of its markup. Put everything else you want into the page using the DW program. Leave space for the markup by making a division that can contain it, positioned where you want that part to appear. Make a backup of that page without the script for later use/reference should the need arise. Then when you have that, use a text only editor like NotePad to insert the script and styles into the head of the page, and the markup into the division you previously created in DW to save space for it. Make sense? If not, perhaps others more familiar with DW can help you on that aspect of it in the javascript or HTML forums here.

    However, if you get close and are just having a few minor problems, I can probably advise you as to how to tweak what you have (once again, in a text only editor) to get it to perform/look the way you want. All I would need at that point would be a link to a live page that shows what you have so far.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  11. #9
    Join Date
    Oct 2009
    Location
    USA
    Posts
    40
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    Let me first thank you for all your detailed help

    I was trying to insert it the same way my teacher did it, unfortunately he put the template together for us so I never learned how to do it myself.

    Here are some screen shots, what he did was make a folder in the directory labled "js" then at the top of the code for the page added code to refer to that folder. But what I'm confused on is where to put the code I have. Save a txt file into that folder?

    Thanks again John, I'm going to try it your way too.

  12. #10
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    not a txt file - your html file in a text editor.

    it's almost always easier to directly edit the code rather than trying to get a web editor to program things the way you want it.

    close DW and try opening the .html (or .htm, whatever DW writes) in Notepad. See what you're actually working with.

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
  •