Help moving scripts Into Separate File

J

JCO

Can somebody help me move scripts into a separate file (ie JavaScript) so
that I can simply call the script from the body... and have it execute.
I've done simple (couple to several lines) ones before but I can't get this
one to work. I posted the url on a free site. Ignore the advertising and
popups. The url is www.angelfire.com/falcon/jcotest

I created the folder and the name of the JavaScript file already. When you
go the site, it simply gives you the option to select one item and the html
will display the "translucent scroller" that I want to put into a
JavaScript. I hope this can be done.

Thanks in advance.
 
J

JCO

Okay, I've done this but I'm having a weird effect.

First of all, instead of an onload, can't I just place this in the body
<script> startit() </script>

When I tried this, the display was unpredictable. Then I took this out and
everything works okay.
It works okay with out having the OnLoad. Why is this. What else could be
triggering this?
 
J

JCO

What do you mean by "don't top post"?

I was under the impression that
<SCRIPT LANGUAGE="JavaScript1.2"
src="../MyScripts/TranslucentScroller.js"></SCRIPT>
simply loads the script in memory so that all functions within the script
can be invoked... when required.

I was under the impression that it can be invoked either by
<script> startit() </script>
or
onload = ?

In general, is this a true assumption?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top