FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Javascript Question

 


klingoncowboy4
Is their a way to make javascript import another html file into a page.

e.g. Import a sig or a menu
mathiaus
javascript itself cannot include anything. You can however inlcude javascript into a page.
Code:
<script type="text/javascript" src="page.js"></script>


so if you create a menu in javascript then you can inlcude it otherwise trying to include html documents etc no.

If your doing something where you need other files from the server, you need to use a server side software such as php rather than client side Wink
klingoncowboy4
I found a way to do it.

http://www.boutell.com/newfaq/creating/include.html

I would prefer to use server side includes for it but it won't work.
dandelion
mathiaus wrote:
javascript itself cannot include anything.

It is not quite true. Please see: AJAX.
klingoncowboy4 wrote:
I would prefer to use server side includes for it but it won't work.

It won't work on your Frihost account? Shocked
But it should work, I use SSI on my site here.
klingoncowboy4
w/e I try it nothing happens...
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.