Results 1 to 5 of 5

Thread: Dynamic Tip of the Day?

  1. #1
    Join Date
    Mar 2007
    Location
    Buffalo, NY
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Dynamic Tip of the Day?

    I am searching for a script that allows linkable daily messages or tips. I have found one that will display a message for each day of the week, however, you cannot link your text.

    My client wants a daily link with surrounding descriptive text, pointing to different areas on their site. Currently, this is being done manually every day, and we would like to automate it.

    Can anyone lend a hand? Thank you.

  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

    Default

    http://www.dynamicdrive.com/dynamici.../dowiframe.htm

    Is a pretty good script if a little old, I would get rid of these lines:

    Code:
    var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1
    var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1
    And change the two instances of this:

    Code:
    (ie||dom)
    to:

    Code:
    (document.all||document.getElementById)
    So that it can work in Opera.
    - John
    ________________________

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

  3. #3
    Join Date
    Mar 2007
    Location
    Buffalo, NY
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ah, I should have mentioned this. I tried running that script, however, this site rests on an ASP FileNet setup, and any iframe will end up having navigation bars automatically attached. This is out of our hands, as we are just a division of a larger entity.

    It basically needs to be handled all within the document. This is the one I found, but again, I can't like any of the tips, which we need.

    Thank you for all the help.

    <table border="0" width="100%" bgcolor="#E8E8E8" cellspacing="0" cellpadding="0">
    <tr><td width="100%">

    <script>
    <!--

    var today_obj=new Date()
    var today_date=today_obj.getDate()

    var tips=new Array()
    //Configure the below variable to contain the "header" of the tip
    var tiptitle='<img src="../../tip.gif"> <b>JavaScript Tip of the day</b><br>'

    //Configure the below array to hold the 31 possible tips of the month
    tips[1]='Tip 1 goes here'
    tips[2]='Tip 2 goes here'
    tips[3]='Tip 3 goes here'
    tips[4]='Tip 4 goes here'
    tips[5]='Tip 5 goes here'
    tips[6]='Tip 6 goes here'
    tips[7]='Tip 7 goes here'
    tips[8]='Tip 8 goes here'
    tips[9]='Tip 9 goes here'
    tips[10]='Tip 10 goes here'
    tips[11]='Tip 11 goes here'
    tips[12]='Tip 12 goes here'
    tips[13]='Tip 13 goes here'
    tips[14]='Tip 14 goes here'
    tips[15]='Tip 15 goes here'
    tips[16]='Tip 16 goes here'
    tips[17]='Tip 17 goes here'
    tips[18]='Tip 18 goes here'
    tips[19]='Tip 19 goes here'
    tips[20]='Tip 20 goes here'
    tips[21]='Tip 21 goes here'
    tips[22]='Tip 22 goes here'
    tips[23]='Tip 23 goes here'
    tips[24]='Tip 24 goes here'
    tips[25]='Tip 25 goes here'
    tips[26]='Tip 26 goes here'
    tips[27]='Tip 27 goes here'
    tips[28]='Tip 28 goes here'
    tips[29]='Tip 29 goes here'
    tips[30]='Tip 30 goes here'
    tips[31]='Tip 31 goes here'

    document.write(tiptitle)
    document.write(tips[today_date])

    //-->
    </script>

  4. #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

    I don't see why you can't do something like so:

    Code:
    tips[1]='Blah Blah <a href="somepage.htm">Link Text<\/a> Blah'
    - John
    ________________________

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

  5. #5
    Join Date
    Mar 2007
    Location
    Buffalo, NY
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Lo and behold it works afterall. My apologies for wasting your time.

    As it turns out, I had 2 of these scripts, and for whatever reason, one didn't work, and I must have either forgotten about this working one, or assumed because one didn't work, the other wouldn't either.

    My mistake. Sorry about that. But thank you for the help.

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
  •