Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hidding scripts (sheets?) 1

Status
Not open for further replies.

daph

Programmer
Jun 9, 2000
65
CA
Hi everybody!<br><br>I was just wondering if there was a way to put my javascript functions into a file, like a javascript style sheet, that I could call in my html document...I don't want others to see the functions in my script...I thought maybe that would be a way to do it...but I don't really know. I've seen some style sheets...but they're only for...well, the style :) I really need something for functions...Any help at all would be greatly appreciated...thanks guys!<br><br>daph<br>Junior Web Programmer
 
daph-<br><br>If you write all of your functions into a seperate text file, then you can save it as a .js file.&nbsp;&nbsp;The file can then be read into the html page like this:<br><br>&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;JSFILELOCATION.js&quot;&gt;&lt;/script&gt;<br><br>just replace 'JSFILELOCATION.js' with the filename that you saved your functions to. <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Dear daph,<br><br>&lt;SCRIPT LANGUAGE=&quot;javascript&quot; SRC=&quot;/library/toolbar/toolbar.js&quot;&gt;&lt;/SCRIPT&gt;<br><br>Hope this helps<br>-pete
 
Would the JavaScript.js file itself need to have a special structure or do you just extract the code itself and put it into its own file intact?&nbsp;&nbsp;That is, does it need some kind of header/footer arragement?<br><br>DonP
 
&gt; That is, does it need some kind of header/footer arragement?<br><br>Nope.<br><br>-pete
 
Thank you soooo much guys! :) I really do appreciate it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top