By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,624 Members | 2,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,624 IT Pros & Developers. It's quick & easy.

Passing value of textarea input as part of URL leaves out CR/LFs

P: n/a
I have a dialog window that pops up from the main app browser window.
The window contains a form (name="savechanges") that includes an input
(name="sql") that is a textarea input.

The dialog window includes a button:

<INPUT TYPE=SUBMIT VALUE="Test SQL" OnClick="javascript:openWin3('/cgi-
uni=67BD&action=TestSQL&viewname=EISWEB_TESTSQL.SQ L&forceregen=true&sql='+savechanges.sql.value);ret urn

The intent is to start yet another browser window (intentionally full-
screen) and pass the URL, including as a parameter the contents of the
textarea input (sql).

function openWin3(URL){
var today= new Date();
var day= today.getDate();
var month= today.getMonth()+1;
var year= today.getFullYear();
aWindow ='&today='+month+'/'+day
+'/'+year,'tablewindow','toolbar=no,location=yes,dire ctories=no,status=yes,menubar=yes,resizable=yes,co pyhistory=no,scrollbars=yes,fullscreen=no,width=80 0,height=600,left=0,top=0');

The problem is that when the contents of the textarea input are
passed, it omits any and all carriage return/line feed characters that
are part of text in the textarea. Only spaces are passed, in the form
of %20....

Ordinarily, when this form is executed, the GET method seems to pass
the information intact. It's this extra Test button that's giving me


Feb 8 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.