Click to See Complete Forum and Search --> : Design for inputting text page and then redisplaying it somewhere else


mparker1113
02-11-2007, 05:47 PM
Hi,

I have a site where I have designed a page where the administrator can either post or type text into a text area. That text is saved in a table field, and is displayed on the main site's "News" page.

I am trying to get the displayed text to look like it does when it is entered into the original textarea. The best answer so far, is to simply use a text area for the display, with the same dimensions as the one in which the text was originally input. This maintains all line breaks. The problem is, that a text area allows for users to click in it,and they can erase or edit the text inside -- Not terrible, but not the best look, either. I tried to disable the text area and then dress it up with css, but IE won't be cooperative with this and it looks dead and won't scroll.

I tried displaying the text into a div tag, but the line breaks where non-existent and it looked like a large run on sentence.

Anyone have a suggestion for this?

mtm81
02-12-2007, 07:35 AM
I would suggest using a IFrame or scrollable layer if it's the scrolling part of the textbox area you are trying to emulate...

an Iframe is probably easier to get working but the scrollable layer would be more easy to customise....

russell
02-12-2007, 05:51 PM
Replace the carriage returns with <br> tags

str = Replace(str, vbCrLf, "<br>")