Message-Id: <firstname.lastname@example.org> Date: Fri, 11 Apr 1997 14:42:27 -0700 To: Walter Ian Kaye <email@example.com>, firstname.lastname@example.org From: Aviram Carmi <email@example.com> Subject: Re: Help with MS IE At 12:25 PM on 4/11/97, Walter Ian Kaye wrote: > On Fri, 11 Apr 1997, Aviram Carmi wrote: > > Here is the problem. I need to pass a hidden text input field that > > contains a line break. If I just enter a carriage return in the "VALUE=" > > it does not seem to work with MSIE. Is there a way to escape the carriage > > return? > > > > I tried %0A and %0D, but the "%" itself get escaped into %25. > > Sounds like a bug to me. (I have not yet tried embedding that.) > > > I do not have the source code to the CGI that I am using, (it is a > > commercial product), so I cannot just enter a unique string of characters > > say '\n' and have the CGI replace that with a line break. > > > > I do think it is a problem with MSIE, since also a TEXTAREA does not work. > > > > i.e. if I enter multiple lines into the text area, MSIE also strips the > > carriage returns from the input. > > MSIE 3.0 for Macintosh does TEXTAREA correctly (I know, because I wrote a CGI > which converts the line breaks to VTs; they were encoded as %0D%0A). > Thanks for your reply, You are correct about the TEXTAREA, the reason that my TEXTAREA is not working (in addition to that other field), is that the TEXTAREA is being submited to a database using another form, and then encoded into a hidden input field just like that other field. I.E. I have a database calculation that looks like: "<INPUT TYPE=TEXT NAME=COMMENTS VALUE="&comments&">". Now since the comments field originated as a TEXTAREA field it contains embeded <CR> which get promptly striped by MSIE.... The other field is actually encoded as <INPUT TYPE=TEXT NAME=ORDER VALUE="line1<CR> line2<CR> "> with the carriage return hard coded into the HTML. trying to encode the above as: <INPUT TYPE=TEXT NAME=ORDER VALUE="line1%0D%0Aline2%0D%0A"> results in the CGI getting line1%250D%0Aline2%250D%0A Thanks for all your help, -avi -- Aviram Carmi +---------------+ tm | O v e r | Executive Vice President, Technology | ----------- | (805) 384-1144 Voice | T h e N e t | (805) 384-9111 FAX +---------------+ Building Profitable Web Sites Today PO Box 1499 http://www.otn.com/ Camarillo, CA 93011-1499 (c) Copyright 1997, Over TheNet. All rights reserved.