NameSilo

Javascript include?

Spaceship Spaceship
Watch
Impact
19
hey
u know how u can include files using php command
<?php include("http://www.url.com"); ?>
is there a way of including files [or showing the content of the file..same thing] in JAVASCRIPT?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
something like
Code:
<script type="text/javascript" src="http://yourdomain.com/javascriptfile.js"></script>
 
0
•••
well that wud just run the code of the javascript on the page, but i think what unknown is looking for is a way to use the include function without any php, so that he can have text documents "echo"ed in html pages.

i dont know of any way to do this, unelss of course you somehow make it into a variable and then call the variable... but that mite get complicated. and javascript can get buggy esp. when ppl have it deactivated lol
 
0
•••
weblord said:
something like
Code:
<script type="text/javascript" src="http://yourdomain.com/javascriptfile.js"></script>
i tried this :
Code:
<script type="text/javascript" src="http://nameprince.com/ads/showad.html"></script>
but it just gave me a Blank page
 
0
•••
Last edited:
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back