Calling Javascripts

I need help setting up a separate folder for all my java scripts, or CGI scripts and setting a link to the individual script with HTML.<br />
<br />
Any help that would explain how to do this properly would be greatly appreciated.<!--content-->Linking and calling style and JavaScript functions:<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<html lang="en"><br />
<head><br />
<title>Basic linking</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><br />
<link rel="StyleSheet" href=http://www.webdeveloper.com/forum/archive/index.php/"mycss.css" type="text/css" /><br />
<script type="text/javascript" src=http://www.webdeveloper.com/forum/archive/index.php/"jscript/main.js"></script><br />
</head><br />
<body><br />
<div class="news" onmouseover="MyJSfunction();">insiderdealer</div><br />
</body><br />
</html><!--content-->Originally posted by Fang <br />
Linking and calling style and JavaScript functions:<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<html lang="en"><br />
<head><br />
<title>Basic linking</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><br />
<link rel="StyleSheet" href=http://www.webdeveloper.com/forum/archive/index.php/"mycss.css" type="text/css" /><br />
<script type="text/javascript" src=http://www.webdeveloper.com/forum/archive/index.php/"jscript/main.js"></script><br />
</head><br />
<body><br />
<div class="news" onmouseover="MyJSfunction();">insiderdealer</div><br />
</body><br />
</html><br />
<br />
<br />
Thanks Fang, but what I want to do is store all my scripts outside the individual pages in a separate folder (or directory) and call them from several different pages to save some repetitive typing. I think that I may be misreading the above, could you possibly explain it line by line.<br />
<br />
For example: <br />
Say I have a script called "tracker", and I want to have this on all my pages, so I set up a folder(directory) named "java.bin" and place the "tracker" script in it. How woulds I call that specific script to the appropriate position on each page? By the way, the individual action of the script may not be visible to the viewer.<!--content-->As Fang showed you, simply put<br />
<br />
<br />
<script type="text/javascript" src=http://www.webdeveloper.com/forum/archive/index.php/"javascript_bin/tracker.js"></script><br />
<br />
<br />
Wherever in your page you wish it to go, and boom! it goes there. :D<!--content-->It's the equivilent of including the script on the page<!--content-->Thanks to you all for your help. Sorry I simply misread fang's original reply. Keep in touch.<!--content-->
 
Back
Top