[lug] cgi text format
rm at fabula.de
rm at fabula.de
Fri Jun 28 09:41:47 MDT 2002
On Fri, Jun 28, 2002 at 09:15:41AM -0600, Paul Bille wrote:
> jd > Is there away using cgi i can pass the info from the text box
> preserving spacing and format?
>
> jd,
>
> I presume users enter text in your text-box as a string. The browser
> wraps the input to fit within the box but this is just for display. The
> string of text is returned to the server as a command line parameter,
> appended to the URL pointing to your cgi application e.g.
> http://www.taproot.bz/myapp.exe?This%xxis%xxthe%xxinput%xxtext.
Only if you use GET as the form's method - not a good idea for longish
text fields since the max. length of a GET request can be rather limited.
> Everything after the ? Is the data from the text-box. Some characters
> are encoded including spaces and line feeds. Your app must convert the
> encoded characters back to the original character to restore the
> formatting.
>
> A well written cgi application will allow the client to embed HTML
> formatting commands into the text box.
Hmm, he wants to send the content of the text box as a mail. Do we
_really_ want HTML in emails :-? Noooo
Back to the original question: the <textarea> tag has an optional
parameter 'wrap' that can take one of three values:
off = no authomatic wrapping takes place.
virtual = the browser will wrap the text so it fits into the textbox
but will send the content as one string.
physical = wrap the text in the form and send the inserted line breaks
to the processing application.
Hope this helps,
Ralf Mattes
> Hope this helps,
> Paul
> http://bille.cudenver.edu/author
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
More information about the LUG
mailing list