TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

copy text from .txt to html...

Page: 1 2 Reply
Jul 5th 2003#111737 Report
Member since: May 24th 2003
Posts: 212
hey

i have a web host which doesnt support anything other than HTML and Javascript.

how can i "paste" text from a .txt file in a directory to a html page? (like the variables in flash
)

i've done it before but i cant find out how to


any help thoroughly apriciated !
Reply with Quote Reply
Jul 5th 2003#111739 Report
Member since: Mar 29th 2003
Posts: 1326
(Your sig messes up the layout of the forums.)

If you have a text file that you need to make an html file, just choose Save As... and then save it as an .html file. I'm not sure about the Flash you're talking about though - maybe you're asking about something a little bit more difficult than I'm explaining.

tom
Reply with Quote Reply
Jul 5th 2003#111741 Report
Member since: May 24th 2003
Posts: 212
(hope sig fixed)

more complicated...

i need some code eg.

< script src=some_text.txt type=insert >< /script >

and what ever is in "some_text.txt" is "pasted" where the < script > for it was.

that way i can make a footer to a page and if i need to change some text in it, i dont have to edit EVERY page.

thanks
Reply with Quote Reply
Jul 5th 2003#111748 Report
Member since: Mar 29th 2003
Posts: 1326
lol your sig's fixed now but with that code you've screwed up this post. I'm using the quick reply box and its actually inside your post. you dont have a sig on this one and theres no footer for this message. kinda weird.

regarding your question - no idea.

tom
Reply with Quote Reply
Jul 5th 2003#111750 Report
Member since: May 24th 2003
Posts: 212
lol sorry i didnt realise it's because i used < SCRIPT >

i thort it didnt actually do that only when usin BB wiv [] brackets lol oh well.

still no idea?
Reply with Quote Reply
Jul 6th 2003#111846 Report
Member since: Mar 29th 2003
Posts: 1326
I've wanted to learn how to do that, too.

tom
Reply with Quote Reply
Jul 6th 2003#111869 Report
Member since: Jun 30th 2001
Posts: 447
This is how I would do it. Put your include stuff in a .js file and use document.write("HTML code goes here! Remember to escape double quotes with backslahses e.g. \""); to print your HTML code. Then wherever you want to include the contents of the newly created .js file, put the following:

<script language="javascript" src="include.js"></script>

Edit: Removed smily
Reply with Quote Reply
Jul 6th 2003#111878 Report
Member since: May 24th 2003
Posts: 212
*kisses* oh THANK YOU!!!!

this is soooo F*CKIN much easier than the p*ice of Sh*t i was using!!!

thanks :D:D:D
Reply with Quote Reply
Jul 6th 2003#111896 Report
Member since: May 24th 2003
Posts: 212
hey just one question...

would using that code be quicker (loading) and cleaner (no whiteness) than using an iframe (which i am doing now) ?


thankie 'oo
Reply with Quote Reply
Jul 7th 2003#112145 Report
Member since: Jun 30th 2001
Posts: 447
To tell you the truth, I'm not sure which would be faster loading. However, I think the IFRAME would because it doesn't have to parse the JavaScript code. Which is like a split second. I would stick with the JavaScript though, because it's much more compatible with other browsers. But its your choice.
Reply with Quote Reply
Page: 1 2 Back to top
Please login or register above to post in this forum