Hone puzzle-piecing skills for Web work

 

Connecting state and local government leaders

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 may ask. 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?

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
may ask.


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
interactive. What are the relative advantages of JavaScript, Visual Basic Script and
Microsoft Active Server Pages?


A: JavaScript and Visual Basic Script code is
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
server.


Visual Basic Script is a subset of the Visual Basic language, unlike Netscape
JavaScript, which has very little in common with Sun Microsystems Inc.'s Java language
except the name.


Visual Basic Script is specific to Microsoft Internet Explorer. Unless you have a
captive audience that uses Explorer exclusively, the better choice is JavaScript, which is
supported by most browsers, including Explorer.


Active Server Pages is not a product so much as a development environment for producing
dynamic Web pages. ASP uses JavaScript, Visual Basic Script, Perl or other script
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
server?


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:


accept="image/imagename.gif"


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:


mailto:contracts@usaf.gov,comptroller@usaf.gov,projmgt@usaf.gov


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 manager@youragency.mil
and automatically insert these words Budget Request in the subject line:


manager@youragency.mil.com?subject=Budget Request


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
manager:


mailto:manager@youragency.mil?cc=comptroller@youragency.mil


mailto:manager@youragency.mil?bcc=archives_Mgr@youragency.mil


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
field:
manager@youragency.mil.com? subject=Budget Request&


manager@youragency.mil?cc= comptroller@youragency.mil&


manager@youragency.mil?bcc=archives_Mgr@youragency.mil


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
Unix?


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
FoxPro databases.


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:


<html>


<head>


<meta http-equiv="Refresh"
content="10;URL=http://
youragency.gov/noblink.html">


</head>


<body>


<blink>Alert</blink>


</body>


</html>


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 sgraves@gcn.com.


X
This website uses cookies to enhance user experience and to analyze performance and traffic on our website. We also share information about your use of our site with our social media, advertising and analytics partners. Learn More / Do Not Sell My Personal Information
Accept Cookies
X
Cookie Preferences Cookie List

Do Not Sell My Personal Information

When you visit our website, we store cookies on your browser to collect information. The information collected might relate to you, your preferences or your device, and is mostly used to make the site work as you expect it to and to provide a more personalized web experience. However, you can choose not to allow certain types of cookies, which may impact your experience of the site and the services we are able to offer. Click on the different category headings to find out more and change our default settings according to your preference. You cannot opt-out of our First Party Strictly Necessary Cookies as they are deployed in order to ensure the proper functioning of our website (such as prompting the cookie banner and remembering your settings, to log into your account, to redirect you when you log out, etc.). For more information about the First and Third Party Cookies used please follow this link.

Allow All Cookies

Manage Consent Preferences

Strictly Necessary Cookies - Always Active

We do not allow you to opt-out of our certain cookies, as they are necessary to ensure the proper functioning of our website (such as prompting our cookie banner and remembering your privacy choices) and/or to monitor site performance. These cookies are not used in a way that constitutes a “sale” of your data under the CCPA. You can set your browser to block or alert you about these cookies, but some parts of the site will not work as intended if you do so. You can usually find these settings in the Options or Preferences menu of your browser. Visit www.allaboutcookies.org to learn more.

Sale of Personal Data, Targeting & Social Media Cookies

Under the California Consumer Privacy Act, you have the right to opt-out of the sale of your personal information to third parties. These cookies collect information for analytics and to personalize your experience with targeted ads. You may exercise your right to opt out of the sale of personal information by using this toggle switch. If you opt out we will not be able to offer you personalised ads and will not hand over your personal information to any third parties. Additionally, you may contact our legal department for further clarification about your rights as a California consumer by using this Exercise My Rights link

If you have enabled privacy controls on your browser (such as a plugin), we have to take that as a valid request to opt-out. Therefore we would not be able to track your activity through the web. This may affect our ability to personalize ads according to your preferences.

Targeting cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.

Social media cookies are set by a range of social media services that we have added to the site to enable you to share our content with your friends and networks. They are capable of tracking your browser across other sites and building up a profile of your interests. This may impact the content and messages you see on other websites you visit. If you do not allow these cookies you may not be able to use or see these sharing tools.

If you want to opt out of all of our lead reports and lists, please submit a privacy request at our Do Not Sell page.

Save Settings
Cookie Preferences Cookie List

Cookie List

A cookie is a small piece of data (text file) that a website – when visited by a user – asks your browser to store on your device in order to remember information about you, such as your language preference or login information. Those cookies are set by us and called first-party cookies. We also use third-party cookies – which are cookies from a domain different than the domain of the website you are visiting – for our advertising and marketing efforts. More specifically, we use cookies and other tracking technologies for the following purposes:

Strictly Necessary Cookies

We do not allow you to opt-out of our certain cookies, as they are necessary to ensure the proper functioning of our website (such as prompting our cookie banner and remembering your privacy choices) and/or to monitor site performance. These cookies are not used in a way that constitutes a “sale” of your data under the CCPA. You can set your browser to block or alert you about these cookies, but some parts of the site will not work as intended if you do so. You can usually find these settings in the Options or Preferences menu of your browser. Visit www.allaboutcookies.org to learn more.

Functional Cookies

We do not allow you to opt-out of our certain cookies, as they are necessary to ensure the proper functioning of our website (such as prompting our cookie banner and remembering your privacy choices) and/or to monitor site performance. These cookies are not used in a way that constitutes a “sale” of your data under the CCPA. You can set your browser to block or alert you about these cookies, but some parts of the site will not work as intended if you do so. You can usually find these settings in the Options or Preferences menu of your browser. Visit www.allaboutcookies.org to learn more.

Performance Cookies

We do not allow you to opt-out of our certain cookies, as they are necessary to ensure the proper functioning of our website (such as prompting our cookie banner and remembering your privacy choices) and/or to monitor site performance. These cookies are not used in a way that constitutes a “sale” of your data under the CCPA. You can set your browser to block or alert you about these cookies, but some parts of the site will not work as intended if you do so. You can usually find these settings in the Options or Preferences menu of your browser. Visit www.allaboutcookies.org to learn more.

Sale of Personal Data

We also use cookies to personalize your experience on our websites, including by determining the most relevant content and advertisements to show you, and to monitor site traffic and performance, so that we may improve our websites and your experience. You may opt out of our use of such cookies (and the associated “sale” of your Personal Information) by using this toggle switch. You will still see some advertising, regardless of your selection. Because we do not track you across different devices, browsers and GEMG properties, your selection will take effect only on this browser, this device and this website.

Social Media Cookies

We also use cookies to personalize your experience on our websites, including by determining the most relevant content and advertisements to show you, and to monitor site traffic and performance, so that we may improve our websites and your experience. You may opt out of our use of such cookies (and the associated “sale” of your Personal Information) by using this toggle switch. You will still see some advertising, regardless of your selection. Because we do not track you across different devices, browsers and GEMG properties, your selection will take effect only on this browser, this device and this website.

Targeting Cookies

We also use cookies to personalize your experience on our websites, including by determining the most relevant content and advertisements to show you, and to monitor site traffic and performance, so that we may improve our websites and your experience. You may opt out of our use of such cookies (and the associated “sale” of your Personal Information) by using this toggle switch. You will still see some advertising, regardless of your selection. Because we do not track you across different devices, browsers and GEMG properties, your selection will take effect only on this browser, this device and this website.