Date:  01/19/2003 09:54:44 PM Msg ID:  001254
From:  FoxWeb Support Thread:  001225
Subject:  Re: garbled Data
TO use the POST method simply change your form tag as follows:
<form method="POST" action="...">
 
In order to read form fields posted via the POST method you will need to use the Request.Form and related methods.

FoxWeb Support Team
support@foxweb.com email

Sent by Michael Pena on 01/19/2003 05:25:53 PM:
I did remove and uninstall the IIS, but the results are the same. 
 
From the examples of Foxweb, it always uses "GET" method.  How do you use "POST" method?  Thanks!
 
-Mike-
 
Sent by FoxWeb Support on 01/18/2003 12:08:38 AM:
Since the problem happens with ASP as well as FoxWeb, it appears that it is caused by your Web server -- not the application processing the data.  I am not sure how you can solve the problem, but reinstalling IIS may help.  Of course you could simply use POST, which is more appripriate for this situation anyway.

FoxWeb Support Team
support@foxweb.com email

Sent by Michael Pena on 01/17/2003 11:40:37 PM:
I copied your script below and named it TestGet.asp, and I executed the file by calling http://mike/TestGet.asp. And the result is the same:
 
 

Submitted fields

Code: '30243'
Title: 'asdfasdfasdfasdfasdfasdfasdfasdfu`|d6=n,p8o";;<1880,-h'

 

 

Sent by FoxWeb Support on 01/17/2003 08:15:01 PM:
I think you misunderstood me.  Just create an ASP file called TestGet.asp with the following code and place it in a location where you have ASP script execution enabled (for example in c:\inetpub\scripts).  Call this script and see if it also garbles your data.
 
<html>
<head><title>Test of GET functionality</title></head>
<body>
<%If Request.QueryString.Count > 0 Then%>
  <h3>Submitted fields</h3>
  <p>
  <b>Code:</b> '<%=Request.QueryString("Code")%>'<br>
  <b>Title:</b> '<%=Request.QueryString("Title")%>'
  </p>
  <hr>
<%End If%>
<form action="TestGet.asp" method="GET">
<h3>Form</h3>
<p>
<b>Code:</b> <input type="text" name="Code" size="25" maxlength="60" value =""><br>
<b>Title:</b> <input type="text" name="Title" size="60" maxlength="200" value =""><br>
<input type="submit" value="Submit">
</p>
</form>
</body></html>
 

FoxWeb Support Team
support@foxweb.com email

Sent by Michael Pena on 01/17/2003 07:51:19 PM:
This is what I did to produce that output, as what I understand from your instructions:
 
TestGet.asp
 
<html>
<head><title>Test of GET functionality</title></head>
<body>
<h3>Submitted fields</h3>
<p>
<b>Code:</b> '<%=Request.QueryString("Code")%>'<br>
<b>Title:</b> '<%=Request.QueryString("Title")%>'
</p>
</body></html>
<form action="http://mike/scripts/foxweb.exe/show_cgi" method="GET">
<h3>Form</h3>
<p>
<b>Code:</b> <input type="text" name="Code" size="25" maxlength="60" value =""><br>
<b>Title:</b> <input type="text" name="Title" size="60" maxlength="200" value =""><br>
<input type="submit" value="Submit">
</p>
</form>
</body></html>

 

Sent by FoxWeb Support on 01/17/2003 04:10:16 PM:
I assume that the result below is what you get when you use foxweb.exe.  Did you have a chance to try calling the asp script included further down in my reply?

FoxWeb Support Team
support@foxweb.com email

Sent by Michael Pena on 01/17/2003 02:02:48 AM:
This is the result:
 
 
QueryString Fields
code  32340203043 
title  asdfasdfas puyq3(k9u-j7>.9$=-59(}Dfa1maAv;- 
 
I only type asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
on title.
 
-Mike-
 
Sent by FoxWeb Support on 01/17/2003 12:48:11 AM:
This is very interesting.  It seems that the problem is related to your server only.  It would be interesting to try using CGI instead of ISAPI just to see what happens.  To do so change the action of the form to /scripts/foxweb.exe/show_cgi.
 
You may also want to create an ASP script that displays the values returned by your form:
 
<html>
<head><title>Test of GET functionality</title></head>
<body>
 <h3>Submitted fields</h3>
 <p>
 <b>Code:</b> '<%=Request.QueryString("Code")%>'<br>
 <b>Title:</b> '<%=Request.QueryString("Title")%>'
 </p>
</body></html>
 
Copy the above code to a file called TestGet.asp in a directory that allows script execution under your Web root and change the action of your form so that it points to it.

FoxWeb Support Team
support@foxweb.com email

Sent by Michael Pena on 01/16/2003 03:04:59 AM:
When I tried this script, it stil has the same behaviour, but when I change the form action = "http://apps.foxweb.com/show_cgi.fwx"   then it becomes normal, no garbled letters:
 
QueryString Fields
Code  103423 
Title  The quick brown fox jumps over the lazy dog. the quick brown fox jumps over the lazy dog. 

 
   by the way I also tried to other browsers, and no problem was encountered.  So is it possible my browser is the culprit?  What should I do to fix this?  Thanks!
 
-Mike-
 
Sent by FoxWeb Support on 01/16/2003 12:36:35 AM:
Please try running the attached script and check for the same behavior.  You will need to save it to a file named TestGet.fwx, or change the action of the form.
 
<html>
<head><title>Test of GET functionality</title></head>
<body>
<%IF Request.QueryStringCount() > 0%>
 <h3>Submitted fields</h3>
 <p>
 <b>Code:</b> '<%=Request.QueryString("Code")%>'<br>
 <b>Title:</b> '<%=Request.QueryString("Title")%>'
 </p>
 <hr>
<%ENDIF%>
<form action="TestGet.fwx" method="GET">
<h3>Form</h3>
<p>
<b>Code:</b> <input type="text" name="Code" size="25" maxlength="60" value =""><br>
<b>Title:</b> <input type="text" name="Title" size="60" maxlength="200" value =""><br>
<input type="submit" value="Submit">
</p>
</form>
</body></html>
 
If the above script exhibits the same (incorrect) behavior, try pointing it to http://apps.foxweb.com/show_cgi.fwx and see what you get.  You should also try using a different browser.
 
If the above script works fine, then the problem may be caused by mistakes in your HTML code.

FoxWeb Support Team
support@foxweb.com email

Sent by Michael Pena on 01/15/2003 12:01:27 AM:
I replaced the action of the form to show_cgi.fwx and this is the result:
 
 
QueryString Fields
code  340 
title  computersgasdgasdgasdgasdgasdgasdbbzv!?h>g:i0,{>-1<>b,(B1=1hqE 
 
 
Notice at the end of the string "title"  it has a garbled letters on it's end.
 
Could I send you the whole program?  I don't have a URL to show, so might as well email you the program (including sample database) in a Zip file.   Can I do that?   What email address should I send it to?
 
-Mike
 
 
Sent by FoxWeb Support on 01/14/2003 11:16:30 PM:
The code works fine when I try it.  Try changing the action of the form to "show_cgi.fwx", which will return exactly what is sent from the browser.  If you are still having the problem, it would be helpful if you could send us a URL that we could use to test this script on your server (while pointing to show_cgi.fwx).  If you don't want to post the URL here, you can send it to us via email.

FoxWeb Support Team
support@foxweb.com email

Sent by Michael Pena on 01/14/2003 07:36:14 PM:
Form1.fwx
 

<form method="GET" action="http://mike/form2.fwx" onsubmit="return verify(this)" name="Form1">

<p>
&nbsp;</p>
<p><b>Code </b> <input type=
"text" name="Code" size="25" maxlength="60" value ="<%Response.Write(allt(mCode))%>"
></p>
<p><b>Title
&nbsp; <input type="text" name="Title" size="60" maxlength="200" value ="<%Response.Write(allt(mTitle))%>"
></b></p>
<p><b>Class <select size=
"1" name="Combo" style="font-weight: bold">

<option value=
"A" <% if mClass="A"
Response.write(' selected ')
endi%> >Asset</option>
<option value=
"E" <% if mClass="E"
Response.write(' selected ')
endi%> >Expense</option>
<option value=
"L" <% if mClass="L"
Response.write(' selected ')
endi%> >Liabilities</option>
<option value=
"I" <% if mClass="I"
Response.write(' selected ')
endi%> >Income </option>
<option value=
"C" <% if mClass="C"
Response.write(' selected ')
endi%> >Capital</option>

</select></b></p>
<p><b>Validations:</b></p>
<p><b>
&nbsp;&nbsp;&nbsp;&nbsp; AR </b><input type="checkbox" name="Check1" value="ON">&nbsp;&nbsp;&nbsp;
<b>Income<input type=
"checkbox" name="Check3" value="ON">&nbsp;&nbsp; Bank <input type="checkbox" name="Check5" value="ON"></b></p>
<p><b>
&nbsp;&nbsp;&nbsp;&nbsp; AP</b> <input type="checkbox" name="Check2" value="ON">&nbsp;&nbsp;&nbsp;
<b>Expense<input type=
"checkbox" name="Check4" value="ON">&nbsp; Sub-Account <input type="checkbox" name="Check6" value="ON"></b></p>
<p>
&nbsp;</p>
<p><input type=
"submit" value="Save" name="B1"></p>
</form>

 
Form2.fwx
 
<%
mCode= Request.QueryString("Code")
mTitle = Request.QueryString("Title")
mCombo = Request.QueryString("Combo")
* mCheck1 = Request.QueryString("Check1")

clos data
use CHART in 0
sele CHART
set orde to CHART1
seek padr(uppe(allt(mCODE)),30,' ')
if !foun()
appe blan
endi
repl CODE with allt(uppe(mCODE))
repl title with allt(uppe(mTITLE))
repl class with allt(uppe(mCOMBO))

%>

Database Chart.dbf
 
code  character 30
Title   character 100
Class  character 1
 
 
Sent by FoxWeb Support on 01/14/2003 04:01:05 PM:
The GET method does not work very well with large amounts of data, but by this I mean thousands of bytes -- not hundreds.  Most probably the cause of the problem in this case is not the size of your data.
 
Make sure that you include quotes around all HTML values and that you use the Server.HTMLEncode and Server.URLEncode methods, where appropriate.
 
In order to provide additional help we would need to view your code.  Please post both your pages in this Forum.

FoxWeb Support Team
support@foxweb.com email

Sent by Michael Pena on 01/13/2003 08:08:15 PM:
I tried using "GET" method form on my first page and created two textboxes on it, and my second page I used the Response.querystring method to get the data, It works fine when I typed about 40 to 50 characters on the input box on the first page, but when I type more than that, the data becomes garbled at the end of the string.  Worse, The other textbox data is also affected, rendering it blank.  What's seems to be the problem?   I read that "GET" method is not very good in getting all the data than "POST" method.  Is that true?  am I doing the wrong thing or what?  Need your urgent reply thanks :-)
 
-Mike-