470,849 Members | 1,254 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

calling a java-script function from a different page?

How can I call a java-script function from an .html page when the
function is in a .js page?

For now the java-script function is placed at the top of the .html
page, but I want to move the java function to its own separate page.
Thank you.

Oct 5 '05 #1
1 1466
Save the file in text-only format with a .js extension.

Include the file in the HEAD section of your Web pages. You can include
more than one external JavaScript file on the page. Just call each
separately like this:

<script src="ExternalJS_1.js"
language="javascript"
type="text/javascript"></script>

<script src="ExternalJS_2.js"
language="javascript"
type="text/javascript"></script>

Servers must be configured to serve .js files.

Oct 5 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Oleg Konovalov | last post: by
9 posts views Thread by F. GEIGER | last post: by
2 posts views Thread by Radha News | last post: by
7 posts views Thread by Klaus Friese | last post: by
7 posts views Thread by Christian Wilhelm | last post: by
6 posts views Thread by Sascha Schmidt | last post: by
3 posts views Thread by meetranjeesh | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.