Reply to Re: using IFrames ... and when there is an enter character...

Your name:

Reply:


Posted by Chris on 02/03/06 00:23

Hi,

javascript text can't be written over multiple lines, so in javascript:

var mystring = 'blah blah
blah blah';

will break.

var mystring = 'blah blah\nblah blah';

will not break but will include your line breaks.

Something like:

str_replace("\n", '\n', $text);

should do it.

GooderThanYou wrote:
> First off, what is the good way to do editable IFrames? I'm using
> IFrame as a way to do RTF. So far it's worked all but when you have a
> return character, here's some of the code.
>
> IFRAME width=600 HEIGHT=400 scrolling="yes" ID=service></IFRAME>
> <? echo '<script type="text/javascript" language="javascript">
> service.document.write("'.$currentInfo.'");
> service.document.designMode = "On";
> </script>' ?>
>
> I am printing to word document and everything is there fine.
>
> When there is a return space....
> I cannot edit the IFrame any more
> The text won't appear in the IFrame when loaded
> (probably some error being thrown, it says theres an unterminated
> string constant in the error on page thing)
>
> Thanks in advance
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация