View Full Version : Script runs when in Body but not when it in an external file. Ideas?

03-13-2008, 01:42 PM
1) Script Title: 3D Spinning Message

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex10/circlemsg.htm

3) Describe problem: Running IE 6 and 7. Most javascript works just fine when it is stored in an external.js file and the script is loaded is in the <head> section. For some reason that continues to ellude me, 3D Spinning Message will not work that way. It only works when the script itself is inserted into the body of the page. (No page on the web, yet. Still in dev.) I was able to verify the script is loading from an external file by sprinkling alerts all throughout it. Each one of them fired but no error messages appeared and the spinning message never appeared. When it is loaded in the body, as detailed in the link above, it works as expected.

Calling either of the two functions in the external script from the body onload parameter caused an error at line 89 in the script.

Any ideas on how to make the spinning logo work from an external .js file or why it can't work? Just trying to understand.

Thanks for any help.