View Full Version : external .js files

07-25-2002, 07:34 PM
I'm attempting to use an external .js files.

And I've run into the following situation.
It works than I come back to it and it doesn't.
I remove everything but an alert box and it works.
I than add in the validation code that is the purpose of the js file.
-- it works.

I than moved it to a different web host and have run into the same sitution where it's not finding the external .js file.
All that is in the file now is an alert box.

This is the code in the html file:

<script scr="javas/validform.js" language="Javascript" Type="Text/Javascript">


<form onsubmit="return validate(this)" name="Appform">

The validform.js file is located in the folder javas and this is all the code that is currently in it.

function validate(theForm)
alert("you are into the javascript");

Is there a known issue with external js files ? I haven't had any luck finding anything when searching. And I'm learning this on the fly - so I may just be missing something simple.



Mrs G
07-25-2002, 08:07 PM

Is the javas folder in the same folder as the HTML document referencing it ?

07-25-2002, 08:12 PM

the folder structure is:

html <file> within the www folder
javas <folder> within the www folder
validform.js <js file> within the javas folder

the src="javas/validform.js" - is in the html code.