FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free 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...
Related topics
resolution detection with javascript
PHP Question
CSS or Javascript?
How to make popup like geocities (javascript?)
Support Question
Textareas and Javascript
HTML/Java Question
Always-on-top window with Javascript?
Javascript
Join Online Classes - 5 Frih$ to Join!
JavaScript Countdown Timer Help!
Javascript/Flash Programmers Wanted- Paying up to 600 frih$.
Help with javascript!!
Javascript Question
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

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