line terminator for TEXTAREA, IE4.5/Mac
Hi,
I am having trouble with a piece of javascript which writes the content of a textarea, specifically the character(s) to use for a line terminator. For all browsers I have access to, except IE4.5 on Mac, writing "\n" causes a line break - but on this browser a square outline character shows, with no line break.
Any ideas? I have tried various things but can't find the answer to this one.
Thanks
Vincent Puglia posted this at 02:12 — 24th May 2000.
They have: 634 posts
Joined: Dec 1999
Hi,
Don't have a mac, but try:
"\r" -- return;
"<br>"
"\x0a0d" cr/lf
Vinny
------------------
GrassBlade: cut&paste javascript
The Javascript Place Forums
Where the world once stood
the blades of grass cut me still
Lloyd Hassell posted this at 05:22 — 24th May 2000.
They have: 231 posts
Joined: Feb 2000
I would try combining "\r\n" together. I don't have access to a mac so if you find an answer, could you post it here?
tcranfield posted this at 09:35 — 24th May 2000.
They have: 9 posts
Joined: Mar 2000
Thanks for your suggestions guys.
"\r\n" is better but this actually causes a double line break on Netscape on a Mac!
"\r" on it's own seems to work great on everything (IE5 & NS4 on PC, IE4.5 & NS4 on Mac).
Tim
Vincent Puglia posted this at 23:47 — 24th May 2000.
They have: 634 posts
Joined: Dec 1999
Hi,
As I always suspected, "When in doubt -- try C." (Love carrying over something I learned someplace else, for something else.
Vinny
------------------
GrassBlade: cut&paste javascript
The Javascript Place Forums
Where the world once stood
the blades of grass cut me still
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.