Hone puzzle-piecing skills for Web work
- By Steve Graves
- Sep 01, 1997
In the tradition of the Web's ubiquitous Frequently Asked Questions from users in
search of answers, here are some hands-on FAQs that agency webmasters and site designers
Q:When I try to preview Hypertext Markup Language pages
on my development server with Microsoft Internet Explorer, the browser attempts a dial-up
connection and displays the message, "Cannot findhttp://localhost/webcontent/page.HTML."
What's going on?
A:Explorer is configured to try to dial into the
Internet automatically. You can change it for LAN connections. Choose View and Options
from the main menu. Select the Connection tab and clear the check box labeled
"Connect to Internet as Needed." You can then preview your files locally.
Q:I'm using HTML forms and a Common Gateway Interface
to direct mail from our server. Why does the form test correctly with Netscape Navigator
but not with Microsoft Internet Explorer?
A: You're probably testing with Explorer 3.0 or an
earlier version that didn't support the mailto tag. Try submitting your form data using
Explorer 3.01 or a later version.
Q: My department would like to make its site more
Microsoft Active Server Pages?
included with HTML in standard Web pages. The scripts download with the page to the user's
browser. Then the script runs on the user's computer. This is distributed processing
because the script gets processed on the client side and saves overhead on your Web
Visual Basic Script is a subset of the Visual Basic language, unlike Netscape
except the name.
Visual Basic Script is specific to Microsoft Internet Explorer. Unless you have a
supported by most browsers, including Explorer.
Active Server Pages is not a product so much as a development environment for producing
languages to call Microsoft Component Object Model or ActiveX controls.
Unlike Java scripts and Visual Basic scripts, ASP executes on the Web server. ASP can
balance client-server loading by generating script code that passes to the browser and
runs on the client computer. This is a good choice if your typical visitor is behind a
firewall that filters out Java applets or pages containing script code.
For more information about ASP, read Working with Active Server Pagesby Michael
Corning, Steve Elfanbaum and David Melnick, published by Que Corp. of Indianapolis.
Q: I want to create a library of Internet utilities
that users can download from our Web site. Should I set up a File Transfer Protocol
A: No. The simplest and most efficient way is to
point your users to the original files on Web servers where they are posted. Downloads
from your server eat up bandwidth and processor time. Pointing to the originals has the
added benefit of ensuring that users get the latest versions.
If you have original content that you want to make available, you can offer the files
on your Web server via the Hypertext Transfer Protocol. HTTP is not limited to document
transfer. It can transfer any file type, including binaries.
To use HTTP as a file server, store the files in a directory accessible to your Web
server. With your favorite authoring tool, create a Web page listing the files and link
the filenames with uniform resource locators that point to the file--for example, http://www.yourdomain.com/files/myfile.zip.
Browser users can download by clicking on the link.
Q: Can users upload files with their browsers?
A:Yes, if the browsers support the HTML 3.2
standard, which allows file selection fields within forms for upstream transfers.
In designing the form, set the Type attribute to file. Give appropriate values to the
Size and Maxlength file selection fields.
Use the Accept attribute to constrain the types of files. For example, if you wanted to
restrict uploading to image files, you would enter in the file selection input tag:
Because a Web browser can't determine whether a user is submitting a valid file, the
forms handler on your server must be able to deal with missing files, interrupted
transfers, unexpected formats or overly large files.
Q: Do you know of a script that can send copies of
Web-generated e-mail to multiple recipients?
A: You can use standard HTML to send e-mail
automatically to multiple recipients. Create a mailto tag and enter the e-mail addresses
of all parties, separating them with commas. Here's an example that would send mail to
three Air Force e-mail addresses:
Don't put any spaces before or after the commas.
Q: Is there a way to automatically fill in e-mail
fields for users when they send messages from our Web server?
A: Append an attribute to the end of your mailto
URL to set the value of the subject field. The following mailto URL will send e-mail to email@example.com
and automatically insert these words Budget Request in the subject line:
This works with Internet Explorer and Netscape Navigator. Navigator extends the
automated field completion to the carbon copy and blind-carbon copy fields, letting you
send copies of Web-generated mail to many parties.
These examples send carbon and blind copies to the comptroller and the archives
Use ampersands to separate the field definitions if you want your Web server to insert
data in multiple fields. The following example inserts data in the address, subject, cc:
and bc: fields without user intervention. Note that spaces are allowed in the subject
firstname.lastname@example.org? subject=Budget Request&
Q: Do I have to install Microsoft Access on my Web
server to use Internet Database Connector with my Access files? And can I run IDC under
A: IDC is a feature only of Microsoft's Internet
Information Server and Personal Web Server, so IDC files won't run on Unix servers.
IDC connects databases to Web pages via the Open Database Connectivity standard. ODBC
uses the Structured Query Language to search and populate Oracle, Access or Microsoft
IDC will work with any ODBC-compliant database. Only the database file itself has to
reside on the server, not the application. Remember, different databases use different
ODBC drivers--you must install the ODBC driver compatible with your database file.
IDC and ODBC together can search and append records remotely to the database file. In
fact, there's little the full database application can do that you can't accomplish with
ODBC and IDC.
Q: Is there a way to turn off the blink tag?
A: Blinking text annoys many users and HTML
authors. The blink tag would be more useful if it grabbed attention for a few seconds and
then turned off, but tagged text blinks as long as the page is loaded.
Although you can't turn off the blink, you can fake it with a meta tag. I discovered
this trick and haven't seen it published elsewhere.
The meta tag, embedded in the HTML document header, uses client-pull to display a
document for a specified time and then load a new document.
The convention is:
The Content attribute determines how long the browser will display the original page
before it loads another file, also specified in the Content field. After the time elapses,
the browser loads the next file automatically.
To try my blink trick, make a copy of a file containing a blink tag. Delete the blink
tag from the copy and save as noblink.html. You now have two files, one with the blink tag
and one without. Insert the meta tag in the header of the document with the blink tag:
This code will display the initial page for 10 seconds, then load noblink.html. To the
viewer, the word Alert will seem to blink for 10 seconds and then stop.
If you have further questions or thoughts, please send e-mail to email@example.com.