Click to See Complete Forum and Search --> : Is there an 'inlude'-option in Javascript?
maw_webdesign
01-23-2003, 06:54 AM
Hi there...
I'd like to know if there is an include-option in Javascript? Like the include-option in ASP.
Can anyone help me with this...
Thanx...
MAW
You can use an external .js. Is that what you are looking for?
<script type="text/javascript" src="your.js"></script>
maw_webdesign
01-23-2003, 07:17 AM
Thanx...
Is it also possible to include a html-page?
No, and why would you want to? By doing so, you will make your included content unaccessable to everyone who has javascript disabled. Much better to do it via the server.
SSI (.shtml)
<!--#include file="your.htm"-->
PHP (.php)
<? include("your.htm"); ?>