Javascript include?

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
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
Close
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
Close
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
Close
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
Close
Last edited:
0
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back