HighDots Forums  

File extension of javascript file included in HTML

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss File extension of javascript file included in HTML in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David D.
 
Posts: n/a

Default File extension of javascript file included in HTML - 01-15-2005 , 10:28 PM






When using the following syntax,
<script type="text/javascript" src="foo.js"></script>
does the file extension matter?

For example, could I instead use
<script type="text/javascript" src="foo.html"></script>
where "foo.html" really contains javascript, not HTML?

My ISP provides an HTML-based host file editor that allows one to only edit
files that have a .html or .htm extension. It would therefore be convenient
for my JS files to also have an .html extension.

- David D.





Reply With Quote
  #2  
Old   
BMR
 
Posts: n/a

Default Re: File extension of javascript file included in HTML - 01-17-2005 , 03:47 AM






I used .txt and .php extensions for Javascript files, but not .html.
Just try it...

BMR

David D. a écrit :
Quote:
When using the following syntax,
script type="text/javascript" src="foo.js"></script
does the file extension matter?

For example, could I instead use
script type="text/javascript" src="foo.html"></script
where "foo.html" really contains javascript, not HTML?

My ISP provides an HTML-based host file editor that allows one to only edit
files that have a .html or .htm extension. It would therefore be convenient
for my JS files to also have an .html extension.

- David D.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.