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/i mages.js" type="text/javascript"></s cript>
will this work if it's outside the head tags, and if so will it pass a W3C xhtml compliance test?
<script src="includes/javascript/i
will this work if it's outside the head tags, and if so will it pass a W3C xhtml compliance test?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I just seem to remember that it caused me an error last time. I'll try it out.
ASKER
Is there anyway to hide the javascript from view source?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
As you say it works fine, thanks.
May i know whats the w3 validator has given u an issue.
It will work only if u provide the perfect path to it.