Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Include a js file from another js file
Message
De
07/05/2001 10:56:15
 
 
À
06/05/2001 19:52:06
Information générale
Forum:
Internet
Catégorie:
Javascript
Divers
Thread ID:
00504023
Message ID:
00504210
Vues:
20
>>I have section in a javascript file that is generated by a robot. That is some javascript code. How can I include that portion of code in my javascript file?
>>
>>Basically, it's something like this:
>>
>>
>>This is my main javascript file. It contains some code...
>>
>>Here, I need to include my javascript file generated by the robot.
>>
>>Rest of the main file code here...
>>
>
>Hi Michel,
>
>Unfortunately, you cannot do that, javascript don't have instructions to include other files.
>But, you may generate your javascript file on the server side using ASP and include there all what you need. Here is example:
>
>somewhere in your HTML page:
< SCRIPT ... SRC="<B>generateScript.asp</B>">< /SCRIPT>
>generateScript.asp
>< %
>Response.ContentType = "application/javascript"
>Response.Expires = -1
>%>
>>This is my main javascript file. It contains some code...
>>
>>Here, I need to include my javascript file generated by the robot.
>
>< !-- #include file="fileGeneratedByRobot.js" -->
>
>>Rest of the main file code here...
>
I finally had my robot to read the javascript file and then add the dynamic portion which is generated by Visual FoxPro into a new javascript file which I now call.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform