Tip of the day script help please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Collectors-info
    General

    • Feb 2006
    • 8703

    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>
    Regards Chris.

    Collectables, Collecting, collectors-info.com

    www.chrismorris.co.uk

    House build project
  • Vasili
    Moderator

    • Mar 2006
    • 14683

    #2
    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?
    . VodaWebs....Luxury Group
    * Success Is Potential Realized *

    Comment

    • Collectors-info
      General

      • Feb 2006
      • 8703

      #3
      Re: Tip of the day script help please

      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?
      Regards Chris.

      Collectables, Collecting, collectors-info.com

      www.chrismorris.co.uk

      House build project

      Comment

      • Aliens Anonymous
        Special Status

        • Jan 2006
        • 1144

        #4
        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"); 

        Comment

        • Vasili
          Moderator

          • Mar 2006
          • 14683

          #5
          Re: Tip of the day script help please

          <looking for a juicy spammer to feed our favorite Alien!>
          . VodaWebs....Luxury Group
          * Success Is Potential Realized *

          Comment

          • Collectors-info
            General

            • Feb 2006
            • 8703

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


            Cheers.
            Regards Chris.

            Collectables, Collecting, collectors-info.com

            www.chrismorris.co.uk

            House build project

            Comment

            Working...
            X