Log in

View Full Version : IFRAME and importing text?



Clancy56
06-13-2007, 02:29 PM
IFRAME and importing text?

Hello all,

What I would like to do is some how tag a single text file so it dynamically loads into different div’s within an IFRAME. The point behind this is to stop the developers from making copy changes and edits to content that the writers have marked up and passed along. I would like the writer’s to modify their MS Word docs and the export them to the appropriate directory as a txt. File so the pages are dynamically updated.

I’m not much of a developer but I know something has been done similar to this somewhere.

Does anyone have any good suggestions or directions?

Thank you,

Clancy56

jc_gmk
06-13-2007, 03:19 PM
not sure about iframes, but I know you can add text to html using by doing the following:

First create your .txt file but add this to the body of it.

document.write("your text goes here")

then link to it like this:


<script type="text/javascript" src="content/mypage.txt"></script>

Hope this helps!

Clancy56
06-13-2007, 04:07 PM
Thanks,

Thank you for the code, but my next dilemma is how to tag the sections of the text file so they show up in the different divs.

I wanted to have the writers create a text file that has a Head, Sub Head, Body Copy, Call Outs, and Closed Caption copy all in one file. This way I have one text file for each page and the writers can make all the edits they want and leave the developers alone and not be making changes every five minutes.