468,133 Members | 1,368 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,133 developers. It's quick & easy.

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

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 =
+'/'+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
0 2694

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Les Peabody | last post: by
7 posts views Thread by Kun | last post: by
2 posts views Thread by bombardier | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.