[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 06-25-2006, 06:08 PM   #1 (permalink)
Senior Member
 
Join Date: May 2005
Location: Ontario Canada
Posts: 2,928
1,675.13 NP$ (Donate)

unknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to behold


javascript include?

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?
unknowngiver is offline  
Old 06-25-2006, 06:29 PM   #2 (permalink)
NamePros Legend
 
weblord's Avatar
 
Join Date: Dec 2005
Location: Philippines - www.Nabaza.com
Posts: 19,840
21,700.43 NP$ (Donate)

weblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatness

Autism Protect Our Planet
something like
Code:
<script type="text/javascript" src="http://yourdomain.com/javascriptfile.js"></script>
weblord is offline  
Old 06-25-2006, 07:12 PM   #3 (permalink)
Senior Member
 
nasaboy007's Avatar
 
Join Date: Jul 2005
Location: NJ
Posts: 1,112
1,454.30 NP$ (Donate)

nasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud of


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
nasaboy007 is offline  
Old 06-25-2006, 07:31 PM   #4 (permalink)
Senior Member
 
Join Date: May 2005
Location: Ontario Canada
Posts: 2,928
1,675.13 NP$ (Donate)

unknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to behold


Quote:
Originally Posted by weblord
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
unknowngiver is offline  
Old 06-25-2006, 07:34 PM   #5 (permalink)
NamePros Legend
 
weblord's Avatar
 
Join Date: Dec 2005
Location: Philippines - www.Nabaza.com
Posts: 19,840
21,700.43 NP$ (Donate)

weblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatness

Autism Protect Our Planet
the js include code only works on .js as well, let me see..
yeah it's js include all right you need to place your .html content in
document.write on your .js file.
there's another way .js and DOM
here's some outside readings:
http://www.quirksmode.org/js/placejs.html
http://www.merlyn.demon.co.uk/js-nclds.htm

if you want to include .htm files within .htm you might want to explore usage of SSI
http://www.javascriptkit.com/howto/ssi2.shtml

hth

Last edited by weblord; 06-25-2006 at 07:40 PM.
weblord is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 02:59 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85