Goodies to Go (tm)
March 24, 2003-- Newsletter #225

By Vince Barnes


Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame

Goodies to Go (tm)
March 24, 2003--Newsletter #225

This newsletter is part of the internet.com network.

Featured this week:

* Goodies Thoughts - Email Forms
* Q & A Goodies
* News Goodies
* Goodies Peer Reviews
* Feedback Goodies  
* And Remember This...



Goodies Announcement

Just in case you missed it before, the new Beyond HTML Goodies book is now available!


Go beyond the basics and learn how the pros add and use dynamic HTML features and advanced JavaScript techniques. Beyond HTML Goodies demonstrates dozens of new and different features readers can add to their existing Web pages using HTML and JavaScript. The book starts with simple text and image tips, such as adding a clock to a Web page or causing text to appear when the mouse moves over an image. It gradually builds to more complex tricks, including manipulating forms or working with cookies behind the scenes. Throughout the book, readers enjoy Joe's snappy style and "to the point" discussion of each "goody" in the book.





Goodies Thoughts - Email Forms

Some of the most common questions our mentor community is asked relate to Email Forms. These are HTML pages that include a form in which the site visitor can enter some information and send it via email to the intended recipient. There are several common uses for this type of form. They are often used as a feedback mechanism, whereby a visitor can send comments or suggestions about the site back to the webmaster. They are also used as a mechanism to capture data and send it off to a recipient at a remote location, bypassing the need for a database in or near the system where the site is being hosted. Webmasters come up with plenty of creative ways of using these forms, but increasingly over recent months, are also coming up against some problems.

The distinguishing characteristic of an email form is found in its "ACTION" statement in the <FORM> tag. There is a description of this type of form in the HTML Goodies Tutorials at http://www.htmlgoodies.com/tutors/forms.html  In the example on that page we see this "ACTION" statement:
<FORM METHOD="POST" ACTION="mailto:your email address">
The "ACTION" in this example is a "mailto:" with an email address. It is this which defines this form as an email form.

The problem arises because modern browsers, IE6 + and equivalent, no longer support email forms! The effect of this is that the visitor fills out the form and clicks the submit button and their email client program is invoked showing a blank email with the specified address in the "To" field. All information entered on the form appears to have been ignored. Essentially, these browsers are treating the email form as if it was a simple "Mailto" email link (for information about email links, see http://www.htmlgoodies.com/primers/primer_4.html)

That's the problem, but like all good programmers all we see is an opportunity for a creative solution! With that in mind, here are a couple of offerings. The first is a solution primarily aimed at Unix (or similar) operating systems, and involves the use of CGI (Common Gateway Interface - see http://www.htmlgoodies.com/beyond/cgi.html) and a mail system such as SENDMAIL (commonly installed on Unix and Linux systems.) The second is a little more specialized, in that it requires FrontPage Extensions.

The first involves the use of a script to send the email form. One such script is the very popular formmail.pl available from Matt's Script Archive at http://www.scriptarchive.com/formmail.html This script is accessed via the "ACTION" as in this example:
<FORM ACTION="/cgi-bin/formmail.pl" METHOD="POST">
There is a lot of comprehensive help information on Matt's site that describes very well how to use this script, so there is not much point in going into details here. There are a couple of things to point out, however. First, in order to use this script, the host system must support CGI and make it available to you. Check with your hosting company if you're not sure. Secondly, you would be well advised to heed the security advice that Matt offers. Formmail, being a popular script, is the target of a lot of exploitation. Some good sense precautions can go a long way to minimize the exposure. It is worth noting that most of the exploits become a problem for your hosting company more than for the website itself.

The second solution is available where FrontPage Extensions are available on the hosting server. The extensions will also need to have been configured to handle email. Again, check with your hosting company if you're not sure. Included in the FrontPage Extensions is a series of capabilities provided by what Microsoft calls "Webbots". If you use a FrontPage Extension aware editor to create your form, the program will provide you the ability to specify an email address to send the form data to as a property of the form. The program then generates the instructions needed to utilize the Webbot to send out your email. This is a very simple method, but does depend on the availability of the extensions and a suitable editing program (such as FrontPage itself.)

In addition to these two types of solution, there are numerous other options of varying degrees of complexity. There is not enough room in here to go into details of these here, but instead it is my hope that these two relatively simple options will provide you a quick and simple solution to the problems posed by the decision to no longer support "mailto" forms.


Thanks for Reading!
- Vince Barnes



Q & A Goodies

Questions are taken from submissions to our Community Mentors. You can ask a Mentor a question by going to http://www.htmlgoodies.com/mentors.

Q. Is possible to click on the TEXT link and have it change to a new color and remain in that color without it going back to it's original color?

A. You could set up a couple of classes this:
A.linkcolora {color:red}
A.linkcolorb {color:blue}
And then in your link you could assign one of the classes for the initial color and use the onClick to change the color. Here is an example:
<A HREF="page1.html" class="linkcolora" onClick="this.className='linkcolorb'" TARGET="framec">Click</A>
The above example assumes that you are using the TARGET property to target which frame to load the document in. When you click on the link the onClick event will change the class name to linkcolorb which is blue. Now if you want to change the color of that link back when another link is clicked on then it gets a little more complicated.
Here is an example of using JavaScript to change the Class Name of the link clicked to the one for a different color. It also makes sure that the other links Class Names are switched back to the original if not. The way the script works is when you click on the link the onClick event will perform the function chgcolor(). This function has the links properties passed to it and then the Class Name is changed so that the color changes. The second part of the function places all of the links on the document into an array and then a for loop checks to see if the link is not equal to the id of the link clicked. If it is not then the class name is changed to the original class name. There are probably other ways to do this, but this is what I came up with quickly.
This example doesn't use frames, but you should be able to adapt it.
<title>Link Color Change</title>
function chgcolor(lnkobj)
if(document.getElementById) // check for IE5+ and NS6+
// This line will change the Class Name of the link clicked
// This line will place all of the links in the document
// in to an array called links.
total=links.length // get the number of links
// if the id of the link in the array is not equal to the
// the link clicked the change the class name to linkclassa.
<a href="#" id="linka" class="linkclassa" onClick="chgcolor(this)">Click Me</A>
<a href="#" id="linkb" class="linkclassa" onClick="chgcolor(this)">Click Me</A>
<a href="#" id="linkc" class="linkclassa" onClick="chgcolor(this)">Click Me</A>

Q. I just finished the 1st tutorial. It says that the Word files should be saved as text and named with an .htm suffix. So, I opened a Word file, chose Save As, and chose .txt as the Save As type. I also renamed the file to include an .htm extension. Then when I clicked Save, I got a File Conversion dialog box warning me that "Saving as a text file will cause all formatting, pictures, and objects in your file to be lost." It gives me Text encoding choices, Options, and End lines with options. What should I choose? I don't understand what all the choices mean. And it wasn't kidding - I lost all of the formatting I had on the original Word document. But if I save it as .htm from the Save As type box, I don't lose my formatting.

A. When you make a file choose "Save As" and not just "Save". Then at the bottom where it says save as type choose "web Page" (.htm .html) and it will give the file a htm extension. You can also just type .html for the extension if you want to use that one.
[Recent versions of Word support HTML directly, even providing WYSYWYG editing capabilities for web pages. Earlier versions of Word supported HTML files only as text files, in much the same way as Wordpad does today. - Ed.]

Q. I am trying to open a new window using JavaScript and I have succeeded in doing so. But I have encountered a problem: the window opens with half on the screen and half the window off. Basically if a user wants to see the other half of the new window, they must drag it into a new position. Do you have any suggestions on how to get the window to open on a specified place on the x-axis and the y-axis of the user monitor?

A. One method is to use the top and left properties. Here is an example:
function OpenWin()
{ PopMen=window.open ("poplink.html","popwin",config="width=175,height=225,location=no,


Q. I want to build a site where people can download documents (.pdf) where do I start?

A. You want to build a site where people can download PDF documents...is a little broad. Do you want to know how to build the site? Do you want to know how to offer the files for download? Do you know HTML? Are you familiar with building websites at all? We can certainly help you with these different aspects but we can't take you step by step through this email. We are only here to help with the areas in which you get stuck. If you are just starting out then the first place to start is here: http://htmlgoodies.earthweb.com/primers/primer_1.html
To allow people to download PFD files or any other file, just create a link to that file. If the person has the program to read the document it is possible that it will open right from the web. To avoid this you can either place the file in a ZIP file or tell the user to right click and choose "Save target as..."

Q. I want to move the mouse over some text and have a small box of text appear, similar to a pop-up button menu. I don't want it to be a menu. I just want it to give a quick explanation of the text.

A. If you wrap the text with the <A HREF> tag you could use the TITLE property which is supported by NS6+ and IE5+ browsers. An example would be this:
<A HREF="#" TITLE="Apples are good to eat.">Apples</A>
If the above does not work out there are several "Tool Tip" scripts that also would work. The nice thing about the above example is that it does not require JavaScript.


Q. I was using the tutorial in my HTML goodies book on JavaScript. I used the code in the book, but I altered it for my own use. I cant get it to work, and I don't know why. It seems like a perfectly sound code to me, but when I try and run it, I get an Object Expected error for the <onLoad> command. (code was attached)

A. In your script, you have "funtion dateinbar()", just change it to "function dateinbar()" and the problem should go away.
[This is such a common type of error - no matter what your level of experience, have someone else look at your code. Often a fresh pair of eyes sees something so obvious that we ourselves keep missing it!]





News Goodies

Web Scam Operators Agree to $20M Penalty
[March 24, 2003] FTC charges SkyBiz.com and its associates with engaging in false and deceptive practices in classic pyramid scheme.

Click here to read the article


Hotmail Seeks to Rein-in Spammers
[March 24, 2003] Microsoft imposes a limit of 100 outgoing e-mails per 24 hour period on Hotmail users in an attempt to hamper spammers.

Click here to read the article


Ask Jeeves Launches Outdoor Ad Push
[March 24, 2003] The month-long, three-city campaign builds on the success the search engine found from its fall initiative.

Click here to read the article




A Chip in the Hand is Worth Two in the PC
[March 24, 2003] New PDA/handset processors from Intel and National Semi are another sign that chipmakers are exploring the mobile universe in favor of a dying PC planet.

Click here to read the article



Verio Announces Managed VPN Service
[March 24, 2003] SafeGuard VPN.CPE is designed to provide managed services and security for custmer premise equipment-based VPNs.

Click here to read the article



Jupiter: Paid Content Market to Soar
[March 24, 2003] Despite bright signs from the paid content market, media houses will still generate the bulk of revenues from online advertising.

Click here to read the article



AOL Debuts Saucier Ad Campaign for Broadband
[March 24, 2003] The $35 million marketing push for its broadband services aims for more sophisticated Web users, altering years of AOL strategy targeting new Internet users.

Click here to read the article



News Sites See Traffic Surges, Maintain Reliability
[March 21, 2003] Web users flood news sites for war news, while the sites mostly maintain excellent reliability.

Click here to read the article



Why Cisco Chose Buy Over Build
[March 21, 2003] The networking giant's $500M purchase of Linksys ranks in the top 10 acquisitions in company history, but the company's first impulse was to build its own system for the consumer market.

Click here to read the article




Girl Scouts: Just Say No to E-Commerce
[March 21, 2003] Enterprising youngsters and over-indulging cookie-lovers turn to eBay as a sales outlet; it goes against scouting's grain but how are you going keep them going door-to-door when capitalism meets high-tech?

Click here to read the article






Goodies Peer Reviews


Every week a site selected each week for review. Each week, reviews of the previous week's selected site are chosen for publication on the HTML Goodies website.


The current week's selected site is published in Goodies To Go and in the Peer Reviews section of the website.  Current contact email addresses for submitting your site and for submitting reviews are published in Goodies To Go.

If you would like to have your site reviewed, sign up for the Goodies To Go newsletter in the Navigation Bar on the left side of this page. 

For full details about this program, see http://www.htmlgoodies.com/peerreviews




Feedback Goodies

Did you ever wish your newsletter was an easy two way communications medium? Ploof! It now is!
If you would like to comment on the newsletter or expand/improve on something you have seen in here, you can now send your input to:


We already receive a lot of email every day. This address will help us sort out those relating specifically to this newsletter from all the rest. When you send email to this address it may wind up being included in this section of the newsletter, to be shared with your fellow readers. Please don't send your questions to this address. They should be sent to our mentors: see http://www.htmlgoodies.com/mentors/

Almost everybody seems to have got the message on the requested format for the Goodies Peer Review site submissions -- thank you all very much! For those who submitted their site two weeks ago but were not selected, remember that you will drop from the pool this week unless you resubmit. If you're not sure of the format and rules, they're outlined above under "Goodies Peer Reviews" and they are on the website at http://www.htmlgoodies.com/peerreviews 

I was surprised by how few of you wrote reviews of last week's site and submitted them. There are a few observations I made that might help you along. If you are concerned that you don't know enough about HTML to write a review, don't be! Your opinion of the appearance and usability of the site is also very valuable. Writing a review of a site is very likely to get you exposure for your site since, as you will notice when you go and take a look at this week's reviews, we also publish the review author's name and web site address (if provided). Write lots of reviews and you and your site will become pretty famous! I anticipate that a lot more readers will submit their site for review than will write reviews, meaning that the odds of being selected are higher for the latter. If you are concerned about the amount of writing -- whether you think 500 words is too much or too little -- just try starting to write a review. Usually, for this type of piece, a length of about five hundred words is a comfortable amount. It lets you say something useful without calling for too much writing effort. Remember that this is a guideline -- you don't have to be right on, but we don't want either one quick paragraph or an epic! Please also check the guidelines for reviews at http://www.htmlgoodies.com/peerreviews -- some reviews were disqualified for non-compliance.

Many thanks also to Peter Larson, the "Crazy Viking" from Sweden, who sent me a note about this saying, with regard to my comments last week about my "messy" desk:
Back here in Sweden we have a saying:
"A messy desk is a sign of a messy intellect, but what is an empty desk then?"
That's great, Peter - I feel much better!




And Remember This . . .

On this day in...

1919 Mussolini Starts Fascist Party
Breaking away from the Socialist Party Benito Mussolini started the Fasci di Combattimento, "Fighting Bands". Commonly known as the Fascists, they wore black shirt uniforms and terrorised their opposition into silence and submission. In 1922 he marched with the Fascists into Rome where King Emmanuel III asked Mussolini to form a new government. He appointed himself Prime Minister and, helped by brutal police, effectively became dictator of Italy. In 1925 he procalimed Italy a Fascist State with himself as "Il Duce" - "The Leader". In 1935 he extended his brutality into Ethopia with an invasion of that country. In 1936 he and Adolph Hitler lent their support to Franco's regime in Spain, and in 1937 he signed a cooperative treaty with Hitler. The Nazi Party was modelled after the Fascist Party, but quickly proved to be much stronger. In 1943, with the filure of Italy's war effort and the allies about to invade Italy there was an uprisiing within the Fascists and on July 25 he was arrested. Fascist Marshal Pietro Badoglio took over and in September surrendered Italy to the Allies. German commandos freed Mussolini from prison eight days later and was put in place as a "leader" of German occupied Northern Italy. With the fall of the Nazis in April, 1945 he was captured by Italian partisans and on April 29 was executed by firing squad along with his mistress, Clara Petacci.

Born today were: in 1908, Joan Crawford; 1912, Wernher Von Braun (creator of the German V-2 rocket, head of U.S. Army missile team and technology leader for NASA)


Thanks for reading Goodies to Go!


Archive Home Page.

  • Web Development Newsletter Signup

    Invalid email
    You have successfuly registered to our newsletter.
Thanks for your registration, follow us on our social networks to keep up-to-date