Link to home
Start Free TrialLog in
Avatar of ncw
ncw

asked on

Position of javascript link and W3C xhtml compliance

I can add javascript anywhere within the html of a web page between tags <script language="javascript" type="text/javascript"> and </script> but can I move the javascript to a .js file and add a reference to the file within the html eg:  
<script src="includes/javascript/images.js" type="text/javascript"></script>
will this work if it's outside the head tags, and if so will it pass a W3C xhtml compliance test?
ASKER CERTIFIED SOLUTION
Avatar of grantunwin
grantunwin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,
May i know whats the w3 validator has given u an issue.
It will work only if u provide the perfect path to it.
Avatar of ncw
ncw

ASKER

I just seem to remember that it caused me an error last time. I'll try it out.
Avatar of ncw

ASKER

Is there anyway to hide the javascript from view source?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ncw

ASKER

As you say it works fine, thanks.