| Mime Type for external js file Can't find right mime to validate document |
jimbeetle

msg:1494038 | 10:09 pm on Apr 22, 2003 (gmt 0) | Ran a few pages through the W3C validator (4.01 Transitional) and it keeps asking for a "type" declaration when calling an external javascript. <script language="JavaScript" type=" " src="js/thisfile.js"> I've tried type="text" and type="text/plain" and a couple of subtypes I made up myself and nothing seems to work. Actually, "text" and "text/plain" validate but the script doesn't execute when the page is loaded. Any ideas, or just live with it? Jim
|
tedster

msg:1494039 | 10:16 pm on Apr 22, 2003 (gmt 0) | type="text/javascript"
|
jimbeetle

msg:1494040 | 10:28 pm on Apr 22, 2003 (gmt 0) | Thanks tedster. Tried that first, must have had a typo somewhere or brain is totally mush. Strange thing is I now of course remember always having the type declared. Don't know when or why I changed it. Oh well, nevermind. Think I'm going to call it cocktail time.
|
g1smd

msg:1494041 | 12:16 am on Apr 23, 2003 (gmt 0) | While you are discussing the code for external Javascript, I'll also throw in the code for calling external CSS with a one line instruction in the <head> section: <link type="text/css" rel="stylesheet" src="/path/file.css"> External CSS files must not contain any HTML tags or code.
|
|
|