Discussion Locked

Javascript Functions - Help!

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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:

3 replies

by pankraz

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).

by matumail

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

by joseph.walsh

In downloaddata() the method call

marqueedata.startDownload(externalmarquee.src,displaydata)

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() )

This discussion is closed to new replies.