0

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:

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

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.

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by sillyboy
0

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

0

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.