Goodies to Go ™
July 19, 2004–Newsletter #294
This newsletter is part of the internet.com network.
http://www.internet.com
Featured this week:
* Goodies Thoughts – The Pro Complex
* Q & A Goodies
* News Goodies
* Goodies Peer Reviews
* Feedback Goodies
* Windows Tech Goodies
* And Remember This…
Goodies Announcement
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.
http://books.internet.com/books/0789727803
Goodies Thoughts – The Pro Complex
There are those who seem to believe that when something is done
"professionally" it is somehow intrinsically more complicated or more difficult
than its amateur counterpart. Conversely, "amateurish" is taken to mean simple,
unskilled or even child-like in nature. I’m here to say that nothing could be
further from the truth!
In my humble opinion, "professional" means that it was (probably) paid for,
"amateur" means it probably wasn’t! A real estate specialist by profession, a
good friend of mine considers himself to be an amateur woodworker. It’s his
hobby. It relaxes him after a stressful day. He makes furniture pieces in the
Amish style, of a quality that the finest of Pennsylvania’s craftspeople would
be proud to produce. He makes them, and uses them in his house. Every now and
then, he’ll give one to a friend. He’s not a professional woodworker at all, but
you’d never know by looking at his product.
This issue comes into play a lot related to the world of website design. "It’s a
great, very professional looking design" or "it’s far too amateurish for a
company’s website" you may hear. The question is, what does that really mean?
A friend of mine has a website that was designed and built for him by a media
and advertising company at considerable expense. That’s professional. It’s what
they advertise is their profession; it’s what they charge for. The problem is
that I recently went to his site to get his address so that I could mail
something to him, and…. yup! — Youve guessed it! — I searched through the
entire site, more than once and it simply isn’t there! How "professional" can a
site be if it cannot meet such a simple and basic requirement of a visitor?
Neither is the professionalism of a site bound up in its use of technology.
There are some advantages to the careful and clever use of technologies; a site
may be a little quicker to load, for example, or it may have a better appearance
in a wider range of browsers. The use of server side languages and database
connection can enable increased functionality in the site, while keeping it
manageable and easy to use. Knowledge of these is not, however, restricted to
those who develop websites for a profession. Far from it; there are amateurs out
there with highly developed skill sets.
To my way of thinking, the quality of a site depends entirely on how easy it is
to use, how easy it is to look at and how easily it meets the requirements I
have as its visitor.
For example, take ABC Widgets. Everybody knows ABC Widgets are the best you can
get. For that reason, there is little need for their website to inundate me with
convincing information about them the moment I arrive at their site. Instead,
there should be links right in front of me to the things I am most likely to
need. Contact information, reference materials, product specs, a support
knowledge base (the granddaddy of the FAQ family) and things of that sort. A
gentle "welcome" and perhaps "click here if you would like to know more about
ABC Widgets" are fine, but I don’t want stuff forced down my throat.
Simplicity and ease of use usually go hand in hand. Complexity, on the other
hand, is usually part of the "professional" complex. Good designs are simple and
easy to use. When it come to the quality of a website, "professional" and
"amateur" are meaningless words. "It’s great!" and "it stinks!", however, get
right to the point.
When someone calls your newly designed site "amateurish", point out to them
that’s only because they didn’t pay you for it. When they call it "professional"
say "I hardly think so — you haven’t paid me for it yet!"
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
https://www.htmlgoodies.com/mentors.
Q. I am creating a form and I would like the
mailTo for the form to be determined by selecting from a list. I’m trying to use
radio buttons with the e-mail address as the Value, but I don’t know how to tell
it to use this as the mailTo. Could you tell me how to do this, or whether there
is another way that would be better?
A. Here is an example of one that I put together a long time ago that
might
fit the bill.
<html>
<head>
<title>Test</title>
<script language="JavaScript">
function FormCheck()
{
var chk = ‘n’
nameval=document.myform.name.value
if(nameval.length==0)
{
alert(‘Please enter your name!’)
document.myform.name.focus();
return false;
}
else
{
if(document.myform.email.value.indexOf("@")==-1 ||
document.myform.email.value.indexOf(".")==-1 ||
document.myform.email.value.indexOf(" ")!=-1 ||
document.myform.email.value.length<6)
{
alert(‘Your Email address must have a @ sign,r a period and be
at least 6 characters long.’)
document.myform.email.focus();
return false
}
else
{
for(i=0;i<=1;i=i+1)
{
if(document.myform.eMail[i].checked)
{
document.myform.action="mailto:"+document.myform.eMail
[i].value
chk=’y’
}
}
if(chk==’n’)
{
alert(‘must check at least one’)
return false
}
}
}
}
</script>
</head>
<body onload="document.myform.name.focus()">
<center>
<form name="myform" method="post" action="" enctype="text/plain"
onsubmit="return FormCheck()">
<center>
Name: <input type="text" size="30" name="name" maxlength="30">
<br>
Email: <input type="text" size="30" name="email" maxlength="30">
<br>
<textarea name="txta" cols="30" rows="4" WRAP="hard"
onfocus="document.myform.txta.select()">Please keep your message 70 characters
or less!</textarea>
<br><br>
<input type="radio" name="eMail" value="my@email.com">Email Me
<br><br>
<input type="radio" name="eMail" value="email@me.com">Email Me
<br><br>
<input type="submit" value="Submit">  <input type="reset"
value="Reset" onClick="document.myform.name.focus()">
</center>
</form>
</center>
</body>
</html>
Q. I’m puzzled: – the text on my web pages changes size for user
preferences, but the
headings don’t. Why is this?
A. Are you viewing your site with Internet Explorer? IE doesn’t allow for
absolute font sizes (pt or px) to change with user preferences — Netscape 6+
and Mozilla do allow it. If you want IE to recognize the font-size user change,
you’ll need to use % or em instead of pt.
Q. I have a web site done in tables and am trying to convert it to CSS.
Everything seems to work fine except for my problems of aligning tables within
tables. I finally got everything to work, but don’t know if the coding is
correct. (sample provided)
A. Aligning inside tables can take some experimentation, but you should
be able to get something working by using the text-align and vertical-align css
properties.
Q. I have a piece of Java script I got off the HTML goodies page to open
a new window. It works well enough but what I want it to do is to run from an
onClick event handler. How do I get it to do this.?
A. You will have to place the window.open into a function and then You
can call the function either by using the onClick or by placing the function
call in the "href". Here is an example:
<html>
<head>
<title>Open new window</title>
<script LANGAUAGE="javascript">
function OpenWin()
{
MessageWin=window.open ("http://www.wsabstract.com", "newwin",config="location=no,status=no,directories
=no,toolbar=no,scrollbars=no,menubar=no,resizable=no");
}
</script>
</head>
<body>
<center>
You can do it this way:
<a href="JavaScript:OpenWin()">Click here</a> <br>Or you can use the onClick
event:
<a href="#" onClick="OpenWin()">Click here</a>
</center>
</body>
</html>
This is but one example. You can also set up the function to accept a variable
that contains the link you want to open up in the new window like this:
<html> <head>
<title>Open new window</title>
<script LANGAUAGE="javascript">
function OpenWin(linkid)
{
MessageWin=window.open
(linkid, "newwin",config="location=no,status=no,directories=no,toolbar=no,scroll
bars=no,menubar=no,resizable=no");
}
</script>
</head>
<body>
<center>
You can do it this way:
<a href="JavaScript:OpenWin(‘https://www.htmlgoodies.com’)">Click here</a>
<br>Or you can use the onClick event:
<a href="#" onClick="OpenWin(‘https://www.htmlgoodies.com’)">Click here</a>
</center> </body> </html>
This will allow you to use the same function for multiple links.
Q. I’m looking for a redirect script that works by months. I’ve seen
scripts that redirect based on the day of the week but not this. I have a simple
event calendar, one page per month, and I’d like the current month’s calendar to
open when someone clicks the "Calendar" link in the main navigation menu on any
page.
A. Here is an example of one way you could accomplish this:
<html> <head>
<title>Calendar of Events</title>
<script language="JavaScript">
myevents=new Array()
myevents[1]="january.html"
myevents[2]="february.html"
myevents[3]="march.html"
myevents[4]="april.html"
myevents[5]="may.html"
myevents[6]="june.html"
myevents[7]="july.html"
myevents[8]="august.html"
myevents[9]="september.html"
myevents[10]="october.html"
myevents[11]="november.html"
myevents[12]="december.html"
function getCal()
{
mydate=new Date
mymonth=mydate.getMonth()+1
location.href=myevents[mymonth]
}
</script>
</head>
<body>
<a href="javascript:getCal()">Calendar</a>
</body>
</html>
News Goodies
ICANN Moves Toward Self-Rule
[July 19, 2004] Executives say they have completed nearly
one-third of the requirements necessary to break off from the
Department of Commerce and self-govern.
Click
here to read the article
‘Deceptive Duo’ Hacker Charged
[July 19, 2004] One half of the high-profile hacking team is indicted, faces
up to 10 years in prison.
Click here to read the article
Macromedia Bundles Up
[July 19, 2004] Take one part Studio MX, one part Contribute, and one part
Flash Paper, shake well and serve.
Click
here to read the article
J2EE 1.4 OKs Open Source App Server
[July 19, 2004] Once a staunch foe of Sun’s J2EE licensing
requirements, JBoss is now embracing certification.
Click here to read the article
IBM Takes on Flood of RFID Data
[July 19, 2004] IBM says its WebSphere Product Center can
make sense of the gush of data from RFID and the Internet of
Things.
Click here to read the article
Intel, Oracle Join Liberty Alliance
[July 19, 2004] The chipmaker and database software provider opt to support
Liberty’s single sign-on services work over Microsoft Passport.
Click here to read the article
iTV: The Next Killer App?
[July 16, 2004] The next generation of the interactive TV goes way beyond
DVRs and enhanced TV guides. But will it take?
Click here to read the article
Red Hat Rebuffed on Restatement
[July 16, 2004] The company gets taken to task as investors launch seven
different class action lawsuits.
Click here to read the article
IBM, Dell Can’t Halt Slide
[July 16, 2004] Neither strong earnings from IBM and Dell nor tame inflation
data could stop investors from another day of selling on Friday.
Click here to read the article
Bill Fills Phishing Holes
[July 16, 2004] Proposed legislation would criminalize phishing from
beginning to end.
Click here to read the article
Every week a site is selected 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
https://www.htmlgoodies.com/peerreviews
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:
mailto:nlfeedback@htmlgoodies.com
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
https://www.htmlgoodies.com/mentors/
For those who are missing Peer reviews: we are once again
revising the Peer review program in the hopes of creating a
workable solution. The current plan is to move the new Peer
Review pages into place in the new year. All those who have
been selected for reviews in the past will be featured in
the new pages. The new method will make it much easier for
your peers to provide feedback and much easier for us to
handle the publication side of things. "Watch this space!"
It’s coming soon!!
Thanks again for all your feedback!
Top
Windows Tech Goodie of the Week:
Using IE’s Web Service Behavior To Create Rich ASP.NET
Applications
http://www.15seconds.com/issue/040708.htm
This article explains the features of the IE Web service
behavior and shows how to asynchronously communicate with an
ASP.NET Web service directly from the client.
*** AND ***
Server-Side Printing from ASP
http://www.asp101.com/articles/john/serversideprint/default.asp
Most talk of printing and ASP is from people who are
confused about what ASP actually does. Nevertheless, there
actually are times when printing from an ASP script makes
sense. This simple little script provides an easy way to
print to a printer connected to your web server from an ASP
page.
Top
And Remember This . . .
On this day in…
1799 The Rosetta Stone was Discovered
About thirty-five miles north of Alexandria, near a town called
Rosetta, a French soldier found a slab of black basalt covered in
ancient carvings. The carvings were writings in three different
languages, Greek, Egyptian hieroglyphics and Egyptian Demotic. The
Greek portion told that the stone had been carved by Ptolemy V in
the second century BC and that the three different language portions
all said the same thing. As such, the stone held the key to
unlocking the ancient hieroglyphic language that had been dead for
almost two thousand years. With his knowledge of Greek, French
Egyptologist Jean Francois Champollion was able to decipher the
hieroglyphic writings in twenty years, thereby exposing the language
and culture of the ancient world to the rest of us.
Today was also the day that in: 1553 15 year old Lady Jane
Grey was deposed as England’s Queen after only nine days; 1870
France declared war on Prussia (Franco-Prussian war); 1877
the first Wimbledon Tennis Championship was held; 1941
British Prime Minister Winston Churchill launched his "V for
Victory" campaign; 1957 the first rocket with a nuclear
warhead was fired at Yucca Flat, Nevada; 1957 Don Bowden
became the first American to break the four minute mile; 1961
the first in-flight movie was shown (on a TWA flight); 1969
Apollo 11 went into Lunar orbit; 1975 Apollo and Soyuz linked
up in space for two days; 1979 two supertankers collided off
Tobago, spilling 260,000 tons of oil; 1979 Nicaraguan
Liberation Day — the Sandinistas took over from Somoza; 1984
Geraldine Ferraro won the Democratic Vice Presidential Nomination;
1985 Christa McAuliffe was chosen as the first schoolteacher
to fly in the shuttle; 1991 Miss Black America contestant
accused Mike Tyson of rape;
Born today were: in 1814 revolver inventor Samuel Colt;
1834 French impressionist painter Edgar Degas; 1860
murderer Lizzie Borden; 1865 surgeon and cofounder of the
Mayo Clinic Charles Horace Mayo; 1896 English author A.J.
Cronin; 1922 US presidential candidate George McGovern;
1923 actor Pat Hingle; 1926 actress Helen Galagher;
1937 actor George Hamilton IV; 1940 actor Dennis Cole;
1946 Romanian tennis player Ilie Nastase; 1947 musician
Bernie Leadon (Eagles); 1947 musician Brian May (Queen);
1948 actress Beverly Archer; 1948 musician Keith Godchaux
(Grateful Dead); 1952 musician Alan Collins (Lynyrd Skynyrd);
1954 actress Kathleen Turner; 1976 actor RJ Williams;
Thanks for reading Goodies to Go!