Includes and Javascript

centiipede
07-06-2001, 10:30 AM
I am not able to run my site on an ASP server at this time... but I would really like to be able to use the <!-- #include --> function... is there any javascripts that would allow me to insert the code in an external file like the ASP Include function would? It would need to display the contents onLoad... I have found source that is close, but requires the user to click on a link to display the content.

çentipede
-"your mother was a hampster and your father smelled of elderberries."

Derek Stone
07-16-2001, 10:46 AM
Say if you wanted to include a header on each of your pages.
In ASP you could use this code:

<% Server.Execute "inc_header.asp" %>

In JavaScript you can do the same thing:

<SCRIPT LANGUAGE=JavaScript SRC="inc_header.js">

Which would link to an external file containing code that could possibly display a menu on the top of the page using the document.write function.

Hope this is what you wanted.

Good Luck
-cl

Mad_Kitten
03-17-2003, 11:16 AM
Can you do this with VBScript?

Rezner
03-17-2003, 05:16 PM
Can you do this with VBScript?client-side: NO
server-side: YES
WSH: YES

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum