So I tried to google my problem, but for a change I didn't get any worthwhile answers. What I want to do is to have an external js file to define some functions (which will be used for form validation). Then I want to use the external functions inside each html to validate the particular forms (obviously forms on different pages will be different).

So what I had done:
Create blah.js
in blah.html:

<script language="javascript" src="blah.js"></script>
<script type="text/javascript">
  ...make function calls etc...

The above is not working for me. Is this even possible, and if so, do you know what is wrong? If you need actual code I have used, I shall post later.

11 Years
Discussion Span
Last Post by sillyboy

That should work just fine. (And don't use language="javascript" anymore. Only use type="text/javascript").


Ok, thanks. Well I will play with it again later on, and see how it goes. Thanks for the re-assurance though.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.