Author Topic: problems with iframes and .txt files  (Read 4773 times)

0 Members and 1 Guest are viewing this topic.

Offline notsowiseone

  • Pre-Newbie
  • Posts: 8
    • View Profile
problems with iframes and .txt files
« on: June 26, 2003, 04:02:43 PM »
hope you can help... I set up the iframes for .txt and all is well except there seems to be no parameter to prevent text from scrolling to the right. for instance- looks a word pad doc with the wordwrap off. I tried CSS on the iframe to no avail. Any ideas would be much appreciated as we do not want to have to put returns in every line befor uploading.

It seems there is no way to embed a table around the media_src?

Help

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
problems with iframes and .txt files
« Reply #1 on: June 28, 2003, 04:08:24 PM »
media_src is media source, the site relative link to the media file.  For a text file you should put media_src inside a <td> tag and control the table dimensions in the <table> tag attributes.

Offline notsowiseone

  • Pre-Newbie
  • Posts: 8
    • View Profile
that will not work
« Reply #2 on: June 29, 2003, 04:49:20 AM »
I tried that but the problem is if you put the td tags around media_src it will not let it see the dynamic path.  It looks for the path including the td tags which of course then it cant retrieve the text.  file not found.  

Has anyone found a workaround for this and can post working code to force a text wrap or use another source ie maybe flash calling on an external txt file?   This seems like it should be a simple task yet has become a sore spot.

Offline seth

  • Newbie
  • *
  • Posts: 33
    • View Profile
problems with iframes and .txt files
« Reply #3 on: June 30, 2003, 01:59:16 AM »
have you tried just using simple SSI to include your text file into the page? Maybe its just me but it seems like it would work.


trychanging your txt.htm template into something like this:
Code: [Select]
<?php require_once&#40;'&#123;media_src&#125;'&#41;; ?>

let me know if it works.

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
problems with iframes and .txt files
« Reply #4 on: June 30, 2003, 08:19:10 PM »
:oops:

Silly me.  What was I thinking?  Maybe <td background="{media_src}">  :?:

Seth's suggestion is the way to go except you should format the include like this to be safe:  (FAQ post about including php files)
Code: [Select]
<?php
require_once&#40;'&#123;media_src&#125;'&#41;;
?>