DR. WEBSITE|Enabling Internet Explorer Users To Do Forms-Based File Uploading via the Web

By Dr. Website Dear Dr. Website®: We have a Web site capable of uploading files via a form, under the guidelines of RFC 1867 Form-based File Upload in HTML. For example, the author of an HTML form who wants to request one or more files from a user might write: FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST> File to process: This is quite powerful and allows a great number of users over various platform configurations to provide data. However, while Netscape supports this, Internet Explorer does not. Is there a workaround solution to allow IE users to also upload files? Form-based file uploading over the Web is a capability that's beginning to be available to Internet Explorer users as well. Microsoft has added this functionality to Internet Explorer with version 3.02a, which is currently available for Windows 3.1 or NT 3.51 users.

In order to use your form, visitors to your site will need to have a browser capable of forms-based file uploading. It's a good idea to list minimal browser requirements on your file upload form page.

A more standard way of having users submit files to your server is via FTP. However, this can raise many security issues-especially if you'd need to allow anonymous FTP-and so may not be a viable option for you and your system administrators.

CGI++ File Upload Demo is a real-world demonstration of this forms-based file upload capability that users can visit to see if their browser can support it. You can also read the text of RFC 1867 online if you're interested in how this feature got its start.

HIDING PASSWORDS Dear Dr. Website®: I've just created the first password-protected area on my site; it can be accessed only if visitors correctly fill in their username and password on an introductory page. The script that our applications person developed to check the password works fine, but I'm having trouble with the form where users enter the password. When someone fills in the form, the password that's entered displays in full for any onlooker to see. Is there an easy way to encrypt the password as it's being entered? Every time you have an element in your form where an interactive response is required of visitors, you can modify its TYPE attribute. In doing so, you control whether users click a radio button, check a box, enter some text, or enter another kind of response.

You can hide the characters that users type in your password input field by changing the tag's TYPE attribute to TYPE=password. This value functions much like the default TYPE=text, but the text is hidden by a series of asterisks or bullet points as the user types. Your code might look something like this:

Enter your username:

Enter your password:

This code creates a text entry field for users to enter a name; then a password field that looks like the text entry field, but the user's input is hidden as it's typed; finally, users can choose to submit the form or to press a button marked "Reset" to clear all fields.

HTML TO POSTSCRIPT? Dear Dr. Website®: Do you know of any packages that will convert HTML documents into PostScript? I want to build a utility that will print a large number of HTML files.

One good resource is the NCSA's Converters to and from HTML page. This site hosts an exhaustive list of conversion programs that translate all kinds of document formats-including PostScript-to and from HTML, plus an online discussion forum. But note that these converters may not be able to handle all elements in HTML documents, such as inline images, for example.

If you don't find what you're looking for, you can always add to the threaded discussion that takes up most of this page. On top of that, there are also links to additional lists of conversion tools at this NCSA site.

++ File Upload Demo -www3.pair.com/webthing/cgiplusplus/filedemo.cgi Converters to and from HTML -union.ncsa.uiuc.edu/HyperNews/get/www/html/converters.html Microsoft -www.microsoft.com/ie RFC 1867 -ds.internic.net/rfc/rfc1867.txt Please Send your site development questions to Dr. Website at webdoc@iw.com, or visit the Ask Dr. Website page at http://webdeveloper.com/drweb/questions.html.



Reprinted from Web Week, Volume 3, Issue 16, June 2, 1997 © internet.com Corporation All rights reserved. Keywords: site_management Date: 19970602

http://www.internet.com