|
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]
|