PDA

Click to See Complete Forum and Search --> : Javascript documentwriting


zippa
Dec 14th, 2000, 07:49 PM
On a page I have, there is a menu section on the left, containing a lot of HTML. My question is, is there anyway I can possibly point to "leftmenu.js" or something? That way I won't have to update every page if I want to change the menu.

sebs
Dec 14th, 2000, 09:28 PM
not sure what your asking but toinclude a .js file:

<SCRIPT language="javascript" src="../file.js">
</SCRIPT>

zippa
Dec 15th, 2000, 06:01 PM
Yeah, I know how to do that.

Just wondering if it will work by somehow using the document.write thing.

I think JavaScript has a limit of how many characters can be between ' and ', so it might be kind of hard.

sebs
Dec 16th, 2000, 01:11 PM
a ok, i tried it once to put a full html page in a javascipt
variable, and it work! with asp too!but don't forget
to put a line (\n->javascript,vbcrlf->asp)so that if you
check your code after it wont be on one line!!