[thelist] IE, Javasript, and Textranges

Aaron Boodman aaron at youngpup.net
Tue Aug 27 16:24:01 CDT 2002


try "\r\n"

-aaron

----- Original Message -----
From: "Joshua Olson" <joshua at waetech.com>
To: <thelist at lists.evolt.org>
Sent: Tuesday, August 27, 2002 2:10 PM
Subject: [thelist] IE, Javasript, and Textranges


> I'm using a text field as a go between on an IE only page so that I can
> construct a string and copy it to the users clipboard.  The code sorta
looks
> like this:
>
> string_im_building = 'This is line one\n';
>
> [do a lot of contatenation here, using \n as the newline character]
>
> document.all.myfield.value = string_im_building;
>
> therange=document.all.myfield.createTextRange();
> therange.execCommand("Copy");
>
> It all works well, except that the contents of the clipboard don't seem to
> have an line breaks.  Very frustrating.  Anybody have any ideas?
>
> TIA,
>
> -joshua
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>




More information about the thelist mailing list