Forum Moderators: open

Message Too Old, No Replies

show external text file with javascript

show external text file with javascript

         

hamid22

2:11 pm on Sep 2, 2014 (gmt 0)

10+ Year Member



Hi everyone
i want to show the content of external text file in the web page but But I can not find a code that will do this for me.

jalarie

1:40 pm on Sep 5, 2014 (gmt 0)

10+ Year Member




<iframe frameborder="1" width="400" height="200" src="text.txt"></iframe>

hamid22

5:51 pm on Sep 5, 2014 (gmt 0)

10+ Year Member



thanks
Is JavaScript can do this?

jalarie

8:19 pm on Sep 5, 2014 (gmt 0)

10+ Year Member



You don't need JavaScript. Just put in the line I gave you and it will call in the text file immediately.

hamid22

7:41 am on Sep 6, 2014 (gmt 0)

10+ Year Member



I used a cms that build a static web page.i want to displaying all of text without scrolling therefore i have to change the frame size Each time .Doing this is hard for me!?

lucy24

7:25 pm on Sep 6, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Doing this is hard for me

It may well be impossible, since scrolling is based on height of content vs. height of container (assuming you meant vertical scrolling). This, in turn, depends on the width of the iframe and on the styling of its content (font, size, line height & spacing and so on). Is your iframe width set as a percentage/emcount or as an absolute number of pixels?