Skip to main content
Inspiring
September 10, 2007
Question

trapping line feed characters in input fields

  • September 10, 2007
  • 3 replies
  • 262 views
I have a Flash input form in which I can eliminate unwanted ascii characters such as leading or trailing spaces, etc. with charCodeAt(i). But line feeds have no ascii value that I know of (as spaces do). As a result, the text stored in the created text files look like this:
&ititle=Oh-Oh
&iwidth=6
&iheight=12
&imedia=watermedia
&imaterial=paper
&iunframed=Price on Request
&iframed=P.O.R.
&istatus=sold&

rather than this (preferred):
&ititle=Oh-Oh&iwidth=6&iheight=12&imedia=watermedia&imaterial=paper&iunframed=Price on Request&iframed=P.O.R.&istatus=sold&

The problem is with reading these variables and throwing them into a single line Dynamic Field... you only see the first line.
I suppose I could hunt for the URL code for line feed (%OA) after importing the variables and slice it out of the string, but it would be simpler if I could eliminate it from the input field to begin with.

Any ideas... thanks
This topic has been closed for replies.

3 replies

kglad
Community Expert
Community Expert
September 10, 2007
you're welcome.
Inspiring
September 10, 2007
thanks K, I'll see if this works for the line feeds..
kglad
Community Expert
Community Expert
September 10, 2007
i use a trim function that removes white space at the end of strings: