+ Reply to Thread
Results 1 to 6 of 6

Thread: Tip of the day script help please
      
   

  1. #1
    Join Date
    Feb 2006
    Location
    Earth
    Posts
    8,719

    Default Tip of the day script help please

    Hi, i have been trying to add a url link into this tip of the day javascript & it dosnt want to except it. On tip 24 , as soon as i add the
    <a href="http://www.collectors-info.com" target="_top">testing for a url link</a>
    It stops working.
    Any ideas on adding a url link or image link to show on the day?

    Thanks.
    PS. I realize this tip 24 may be out of date in some areas soon.

    <script language="JavaScript">
    /*Tip Of The Day Script
    Created By MikeW at mikew@dvol.com. Copyright 2000 by MikeW - Please leave all credits in place if useing this script. Featured on A1 javaScripts, www.a1javascripts.com
    Promoted by http://www.webbiesite.com*/

    //Make new array and get the current day in var today
    var msg = new Array();
    Stamp = new Date();
    today = Stamp.getDate();
    //put the tip of the day in each msg[x] string
    //change tips each month, automatically switches every day
    msg[0]="Tip 1"
    msg[1]="Tip 2"
    msg[2]="Tip 3"
    msg[3]="Tip 4"
    msg[4]="Tip 5"
    msg[5]="Tip 6"
    msg[6]="Tip 7"
    msg[7]="Tip 8"
    msg[8]="Tip 9"
    msg[9]="Tip 10"
    msg[10]="Tip 11"
    msg[11]="Tip 12"
    msg[12]="Tip 13"
    msg[13]="Tip 14"
    msg[14]="Tip 15"
    msg[15]="Tip 16"
    msg[16]="Tip 17"
    msg[17]="Tip 18"
    msg[18]="Tip 19"
    msg[19]="Tip 20"
    msg[20]="Tip 21"
    msg[21]="Tip 22"
    msg[22]="Tip 23"
    msg[23]="Tip 24<br>Test for text<br><a href="http://www.collectors-info.com" target="_top">testing for a url link</a>"
    msg[24]="Tip 25"
    msg[25]="Tip 26"
    msg[26]="Tip 27"
    msg[27]="Tip 28"
    msg[28]="Tip 29"
    msg[29]="Tip 30"
    msg[30]="Tip 31"
    //write todays tip so that the tip number matches with the day
    document.write(msg[today-1]);
    </script>

  2. #2
    Vasili's Avatar
    Vasili is offline Moderator
    Join Date
    Mar 2006
    Posts
    13,221

    Red face Re: Tip of the day script help please

    try inserting a real link ...to "test," that is!

    Assuming also that the remainder of the array is properly completed, so the script can "run," right?

  3. #3
    Join Date
    Feb 2006
    Location
    Earth
    Posts
    8,719

    Default Re: Tip of the day script help please

    Quote Originally Posted by Vasili View Post
    try inserting a real link ...to "test," that is!

    Assuming also that the remainder of the array is properly completed, so the script can "run," right?
    Hi Vasili, not quite sure what you mean (a real link)? If i remove this part.......
    <a href="http://www.collectors-info.com" target="_top">testing for a url link</a>
    The script works fine. I made sure the link was ok & this works fine. But they don't like being together. Wasn't sure if links were entered in a different way when using JavaScript?

  4. #4
    Aliens Anonymous is offline Special Status
    Join Date
    Jan 2006
    Location
    Dark side of the moon
    Posts
    1,161

    Default Re: Tip of the day script help please

    The part between the " " is for text only. msg[22]="Tip 23" plus putting // in there cancels the rest out so anything after the // is not reconized. the // is offten used by the script writer to explian denote something. mainly in php. therefore you will always get the error messages in ie anyway like object ","
    this how the // is used in php .
    PHP Code:
    // check there's a form ID included
    else if (empty($_POST['form_tools_form_id']))
      
    ft_output_message("no_form_id"); 

  5. #5
    Vasili's Avatar
    Vasili is offline Moderator
    Join Date
    Mar 2006
    Posts
    13,221

    Thumbs up Re: Tip of the day script help please

    <looking for a juicy spammer to feed our favorite Alien!>

  6. #6
    Join Date
    Feb 2006
    Location
    Earth
    Posts
    8,719

    Default Re: Tip of the day script help please

    Thanks for looking Aliens. Was worth a try.
    But! have found a similar one that uses iframes that should do the trick.
    http://www.dynamicdrive.com/dynamici...dowiframe2.htm

    Cheers.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49