You are here: Re: using IFrames ... and when there is an enter character... « All PHP « IT news, forums, messages
Re: using IFrames ... and when there is an enter character...

Posted by GooderThanYou on 02/06/06 20:20

Chris wrote:
> 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
> >'

I did replace "\n" with '\n' and it still seems to have problems....
plus i'm not sure how that is changing anything, a "\n" isn't any
different from '\n' I thought.

 

Navigation:

[Reply to this 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

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