View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
As it turns out, FoxWeb 1.29c converts "\b" to a backslash character in fields of type "text" when the enctype is equal to "multipart/form-data".  This problem was fixed in FoxWeb 2.
 
Although this may be a problem in cases where the user wants to send a text field with the above character combination, it should not prevent you from uploading files.  You see, for a file upload the field type must be "file".  In the example below, you can specify a "\b" combination in the File Upload field, which specifies the path of the file to be uploaded.  The Text Data field will not correctly process "\b", but you probably don't need this functionality anyway:
 
<html>
<body>
<form action="/scripts/foxweb.exe/show_cgi"
method="post" enctype="multipart/form-data">
Text Data: <input type="text" name="TextData" size=40><br>
File Upload: <input type="file" name="FileData" SIZE=40><br>
<input type="submit" name="enter" value="Submit Data"><br>
</form>
</body>
</html>

FoxWeb Support Team
support@foxweb.com email

Sent by Sameer K on 12/01/2002 08:29:01 AM:
Hi,
I think I have figured out the conditions under which this problem occurs for me.  The FORM element has the enctype attribute added to it so that I can upload a file.
If you take the ContactMine application (that comes with FW 1.29) and in the cont_form.mrg file you add enctype="multipart/form-data" in the FORM element and then when you go to add a contact you enter co\bain and then save the contact the first name will be saved only as co\ain.
Of course in that form you are not uploading any file but in my form I need to upload file and so I do need to use enctype.
 
Sameer
 
Sent by Sameer K on 12/01/2002 07:57:23 AM:
Hi,
What you have suggested will work only with version 2.x, right?  I am using version 1.29
Sameer
Sent by FoxWeb Support on 11/30/2002 01:25:20 PM:
Very strange.  We have never had such a problem reported to us.  COuld it be that whatever is processing the form input is regarding the backslash as an escape character?
 
Try using the following code:
 
<%
M.ThisScript = SUBSTR(Request.PathInfo, RAT('/', Request.PathInfo) + 1)
%>
<html>
<head></head>
<body>
<form action="<%=M.ThisScript%>" method="POST">
<input type="textbox" name="somename" SIZE=40 MAXLENGTH=60>
<input type="submit" value="Submit">
</form>
<%
IF Request.FormCount("somename") > 0
Response.Write("<P>You entered: '" + Request.Form("somename") + "'</P>")
ENDIF
%>
</body>
</html>

FoxWeb Support Team
support@foxweb.com email

Sent by Sameer K on 11/29/2002 05:02:48 AM:
Hi,
I am using an input box to allow the user to enter some data using
<input type='textbox' name='somename' SIZE=40 MAXLENGTH=60>.
 
When the user enters: d:\temp\backup and I do a FormField("somename") I only get d:\temp\ackup - note that the "b" is missing.
 
How do I workaround this - is there something I should be doing to make sure that this does not happen?
 
Thank you.
Sameer