Welcome visitor
* Login
* Register
It is currently March 25th, 2019, 3:15 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » JavaScript



Post new topic Reply to topic  [ 3 posts ] 
Author Message
  How to create and use a .js (JavaScript) external file
PostPosted: November 13th, 2009, 1:20 am 

Posts: 19
In the previous topic (http://www.scriptingok.com/forum/t12_1037-Jquery-what-is-it) its mentioned a .js file. I know that it is for javascript code and that it is useful to save time when programming and to have a faster user expirience (as it just needs to be downloaded once). But how can I create and use such a file?


Top
 Profile  
 
  Re: How to create and use a .js (JavaScript) external file
PostPosted: November 13th, 2009, 1:52 am 
User avatar

Posts: 21
Inside the <head> section of your HTML file, wite:

<script src="/pathToFile/fileName.js" type="text/javascript"></script>


The .js file should be a simple text file with your JavaScript code inside.

Good luck!

_________________
IT. Consulting
www.tnogos.com


Top
 Profile  
 
  Re: How to create and use a .js (JavaScript) external file
PostPosted: November 13th, 2009, 5:44 am 
User avatar

Posts: 56
To create such a file use any text editor and put there the JavaScript functions, code, etc. Hope this topic may help you http://www.scriptingok.com/forum/t5_576-Using-external-file-for-JavaScript-code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

FORUMS » Client Side » JavaScript


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron