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

include

 


sonam
Is it any way to include some file with JavaScript in HTML but without iframe?

Sonam
wumingsden
sonam wrote:
Is it any way to include some file with JavaScript in HTML but without iframe?

Sonam


This is probably not the best way to do it but I do this:

Place all of my javascript code that I want to use on all pages at mysite.net/includes/inc_scripts.php - I then use a simple include to all the scripts into any page that I wish.
aningbo
i seriously doubt if you could include a page using javascript.

why dont u used php which is as simple as

Code:
<?php include("link.php"); ?>
Stubru Freak
AJAX, or write the external file as:
document.write('LINE 1\n\'Quoted line 2\'\nLine 3');
Then you can just include it the normal way.
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

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