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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to call a JavaScript source file from within another Javascript?

Status
Not open for further replies.
Well catch it.
Client-side:
Code:
<SCRIPT LANGUAGE=&quot;JavaScript&quot; SRC=&quot;Includes/MyScriptLibrary.js&quot;></SCRIPT>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
// code that uses MyScriptLibrary functions and objects
</SCRIPT>

Server-side:
Code:
%>
<!--#INCLUDE FILE=&quot;..\Includes\MiscFunctions.inc&quot;-->
<%
// you cde goes here
%>
or, include file in include file:
Code:
<!--#INCLUDE FILE=&quot;wddxDes.asp&quot;-->
<SCRIPT LANGUAGE=&quot;JavaScript&quot; runat=server>
///////////////
// trim(string) - trim string from trailing blanks
function trim(pcString)
{
...
</SCRIPT>



Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top