General discussion

  • Creator
  • #2259051

    Javascript Functions – Help!


    by matumail ·

    I am new to Javascript in web design and I can’t figure this out. For some reason my function StartClock12 and function StartDate will not work while the other function are there. If I delete functions downloaddata and displaydata, StartClock12 and StartDate work fine. Can anyone tell me why? Here is my code:

All Comments

  • Author
    • #3283501


      by pankraz ·

      In reply to Javascript Functions – Help!

      In the first two functions the semicolon at the end of the command
      line is missing. Some Browsers don’t execute all the code that
      comes after a scripting error. (On Mac OS X Firefox & Safari your
      script runs fine even without semicolons).

      • #3199983


        by matumail ·

        In reply to semicolon

        I went a different way and was able to make it work, but I will make note of this. Thanks for your help.

    • #3283064

      RE: Javascript Functions – Help!

      by joseph.walsh ·

      In reply to Javascript Functions – Help!

      In downloaddata() the method call


      includes an argument called displaydata, which is the name of the function just below it.

      Since displaydata() does not return a value, I will assume you have a variable named displaydata?

      If you intended to call displaydata() as a parameter to the aforementioned method call (marqueedata.startDownload), then add a pair of parentheses to displaydata:

      marqueedata.startDownload( externalmarquee.src, displaydata() )

Viewing 1 reply thread