|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
How to include files in JavaScript ?
Hi
In the html part in a php script I include a file which includes functions in it. <script LANGUAGE="JavaScript" SRC="includes/validate.js"></SCRIPT> I want to include in the included fille "validate.js" another fille funcs.js. How do I do that ? Can it be dione ? Thanks & best regards |
|
#2
|
|||
|
|||
|
RE: How to include files in JavaScript ?
echo file_get_contents('file.js'); |
|
#3
|
|||
|
|||
|
RE: How to include files in JavaScript ?
|
|
#4
|
|||
|
|||
|
RE: How to include files in JavaScript ?
typically in a situation like that I would include both files one after another in the main script. If one depends on functions or definitions in the other, make sure to include the dependencies first...
Code:
<script LANGUAGE="JavaScript" SRC="includes/funcs.js"></SCRIPT> <script LANGUAGE="JavaScript" SRC="includes/validate.js"></SCRIPT> If there is another way to include the files, I haven't ever done it. -Jeff |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > How to include files in JavaScript ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|