Goodies to Go ™
December 30, 2002–Newsletter #213
This newsletter is part of the internet.com network.
http://www.internet.com
Featured
this week:
* Goodies Thoughts –
Year Out, Year In.
* Q & A Goodies
* News Goodies
* 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.
http://books.internet.com/books/0789727803
Goodies Thoughts – |
Year Out, Year In. |
As December draws to a close, it is traditional in
these parts, to take a retrospective look at the
year passed, see what lessons are to be learned from
the experience of it, and to make resolutions aimed
at improving things for the year that is about to
start.
That’s the theory.
In practice, we give great thanks for having been
able to survive the last year, hope like heck that
things will improve and make wild resolutions that
we know in our hearts won’t last out New Year’s Day!
Perhaps it’s actually somewhere in between!
When we look at the Web, however, there’s always
brightness and joy! My good friend Scott, says that
Net years are counted like dog years — there are
seven of them to every calendar year. I think that
the Net uses a form of metric calendar in which
there are ten years to every calendar year. Either
way, the pace of things on the Net, especially
including the Web, justifies either view. I was
thinking of doing a quick summary of the changes we
have gone through this past year but there are so
many it would be an impossible task. Here, however
are a couple of observations and a quick look
forward.
One of the things that I notice most over recent
months is the increase in numbers of "just plain
folks" who are creating their own web pages and
sites. Hurrah and congratulations to every one of
you! Gone are the days when heaven and earth had to
be moved before someone would be "published". Now,
somebody can decide "I think I’ll publish something
about the slug population of Upper Lowerbury,"
register a domain name, create the site and they’re
done! When people now search for information about
those slugs, http://www.upperlowerbury.com/slugs
will jump into their attention. In this way,
everybody can be published. I am absolutely in favor
of every way in which we can all share our knowledge
Along with this increase in the number of new
developers, there has been in increase in the number
of, and in the capabilities of, "novice" web
developer tools. Some of these "novice" tools that
are being created are very powerful and can create
beautiful, useful and capable web sites. I look for
these tools to increase in number, increase their
capabilities and become even easier and more
intuitive to use. Everybody should be a web
developer. Everybody has a story to tell.
My prediction for 2003: companies everywhere will be
going .Net crazy. The new architecture will be
pushing the web further into the front of company
operations. Folks with .Net developer skills are
going to be very much in demand. Never underestimate
the marketing power of a giant like Microsoft,
antitrust suits notwithstanding.
My wishes for you in 2003? I wish you a happy,
successful and prosperous year. I hope you continue
with your web development efforts and create great
things to add to the wealth that is the web. I thank
you for your interest in and loyalty to HTML Goodies
and to our Goodies To Go newsletter. Spread the word
and keep us going!!
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’m trying to set up an email form.
How do I send form data to an email address
instead of a file? My email form just brings up
outlook; how do I get it to send email directly?
When I get data to me email address it is in an
attachment with an ".att" extension — what is
this and how do I read it? How do I get my email
form data to be formatted as text instead of
being full of stuff like "1=on&2=on&3=Better+Management"?
A. To get rid of the .att extension (and
formatting problems) add enctype="text/html to
the form tag like so:
<form action="mailto:somebody@somewhere.com"
method="post" enctype="text/plain">
NOTE, HOWEVER:
Version 6 (and above) browsers do not support
email forms (action="mailto:… etc.) Instead,
it is necessary to use CGI scripts (PERL, CGI
Shell Scripts, PHP etc.) Alternatively, if your
server supports FrontPage extensions, there is a
"WebBot" in FrontPage that automatically handles
sending form data to an email address (as an
option to, or in addition to saving it to a
file.)
Q. I have taken over responsibilities for
an inhouse intranet site and when users access a
certain page, I want to have a "pop-up" page
come up that gives specific information or
instructions, and I would like to have it close
itself after a certain amount of time. Any
suggestions?
A. Try using a timer to execute a
self.close command. You might find a free script
that does this already at http://www.javascriptsource.com
or http://webdeveloper.earthweb.com, and there
are other free script sites that might have
something.
Q. When creating a HTML page do I have to
put:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
above the <html> tag?
A. It should be used. Without it a page
will not validate. It is telling the browser
that this is an HTML document, using the "transitionial"
dtd. The browser then knows exactly how to
render the page. Without it the decision lies
upon the decision of the browser.
For more indepth info check out this link:
http://www.w3.org/TR/2002/REC-xhtml1-20020801/#dtds
Q. When I run the following script it
returns the correct day, year, and time.
However, the month returns as the previous
month, e.g. this month, December (12), is shown
as November (11) (my computer does have the
correct date.)
<SCRIPT LANGUAGE="JavaScript">
RightNow = new Date();
document.write("Today’s date is " +
RightNow.getMonth()+ "-")
document.write(" "+ RightNow.getDate() + "-" +
RightNow.getFullYear() + ".")
document.write("You entered this Web Page at
exactly: " + RightNow.getHours() + " hours")
document.write(" "+ RightNow.getMinutes() + "
minutes and " + RightNow.getSeconds() + "
seconds")
</SCRIPT>
A. I have run into this before. The
solution is to:
1. Add the following code immediately after
RightNow = new Date(); in your function:
newMonth = RightNow.getMonth() + 1;
2. Next change the line that returns the month
to:
document.write("Today’s date is " +newMonth+
"-")
Q. How can I force a user to submit a form
by clicking the "Submit" button only and not by
using the "Enter" key?
A. This script had the desired effect,
but not in all browsers. It worked in Netscape 7
and IE 6, not in Opera 6 and Netscape 4.
<script language="JavaScript">
<!– ;
function showAlert() {
alert("don’t do that");
return false
}
// end hide –>
</script>
<form action="http://yourcgiscript"
method="post" onKeyPress="showAlert()">
<input type="submit" value="default value">
</form>
Q. I want to create an online newletter,
but I dont want to use just text, the webpage
style newsletter is what I want. Can you guide
me on how to create it?
A. I use a great application called
Ocean12 Mailing List Manager. It has to run on a
server that supports Active Server Pages (ASP).
He offers two versions, one free and the other
is about $30.
http://scripts.ocean12tech.com/asp/mailinglist
News Goodies
Register.com Wins Stay Against Domain Reseller
[December 30, 2002] Register.com rejoices in the
latest finding against Domain Registry of America, a
firm it alleges is a ‘deceptive marketer.’
Click
here to read the article
Bugzilla Bug Squashed
[December 30, 2002] The popular open-source
bug-tracking system has a potentially harmful bug of
its own.
Click
here to read the article
Pew Study Finds Web’s Reach Expanding
[December 30, 2002] Internet becomes relied upon
medium for millions, according to the Pew Internet
and American Life Project.
Click here to read the article
Microsoft Sued Over Phone Software
[December 24, 2002] Sendo claims its former
partner wrongfully appropriated some of its
intellectual property for so-called smart mobile
phones.
Click here to read the article
Online Retailers Ring Up a Merry Christmas
[December 27, 2002] E-tailers thrived this season
despite a shorter shopping season and a weakened
economy, say analysts, a sure sign of stronger
e-tail seasons to come.
Click here to read the article
Popular Pop-Ups?
[December 26, 2002] Orbitz tries to make the Net’s
most hated ad format more effective by adding a
little fun — and providing a trip to its site.
Click here to read the article
(If you ask me, they’re making things worse & worse!
– Ed)
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/
Last week I started using the dot in the code
samples in the Q&A Goodies (see above) and thanked
an anonymous writer for the suggestion. This week, I
thank Shari Pierce of Homefront Studios (
http://www.homefrontstudios.com ) for
identifying herself, and for sending in this
suggestion in response to the CSS/NS4 question in
last week’s Q&A Goodies (see
https://www.htmlgoodies.com/letters/212.html ):
I happen to have a cute little trick I picked up
from somewhere — most likely from those web
standards folks — that handles this quite nicely.
The trick uses two external style sheets. I call
them main.css and safe.css. Main.css is called via
an @import statement rather than the normal CSS file
call. Browsers that choke on CSS ignore the @import
command and fail to call the stylesheet titled
main.css. The only stylesheet called into those
browsers is safe.css. Both stylesheets, however, are
called into browsers that can handle complicated CSS.
I test all my styles and classes in main.css first
and the things that make NS4 choke get moved over to
safe.css. It makes for a very boring page in NS4,
but at least it isn’t mangled beyond all
recognition.
1) This goes in the <head> section:
<style type="text/css"> <!–
@import "main.css";
–> </style>
<link rel=stylesheet href="safe.css" type="text/css">
2) Here’s the CSS class that will hide the warning
from all but the bad browsers. It goes in the
imported style sheet, main.css.
.ahem {display: none;}
3) This goes in the page where you want the warning
showing:
<!– Help NS4 users –>
<iframe class="ahem"><b><i>
Please note: This site will look much better in a
browser that supports
<a href="http://www.webstandards.org/upgrade/">web
standards</a>,
but it is accessible to any browser or Internet
device.
</i></b></iframe>
<!– End NS4 help –>
That message, of course, should be changed to
reflect the personality of the site. This is the
generic version that came with the trick when I
found it.
Thanks again, Shari, and thanks to all of you who
sent in kind words about my holiday wishes — you
warm my heart.
Top
And
Remember This . . .
On this day in…
1922: USSR Created
Following the Russian Revolution of 1917 and the
Russian Civil War which lasted the following three
years, Vladimir Lenin and his Bolshevik Party ran
the "Soviet Forces". This was a coalition of
workers’ committees and soldiers’ committees that
called for the creation of a socialist state. On
this day in 1922 the Union of Soviet Socialist
Republics (USSR) was established. It comprised a
confederation of Russia, Byelorussia, Ukraine, and
the Transcaucasian Federation (divided in 1936 into
the Georgian, Azerbaijan, and Armenian republics).
Based on Marxist socialism, the Soviet Union, as the
new communist state was also known, replaced the
Russian Empire.
Over the next few decades the USSR became one of the
most powerful and influential states in the world.
It eventually controlled fifteen Republics: Russia,
Ukraine, Georgia, Byelorussia, Uzbekistan, Armenia,
Azerbaijan, Kazakhstan, Kyrgyzstan, Moldova,
Turkmenistan, Tajikistan, Latvia, Lithuania, and
Estonia.
The ten year occupation of Afghanistan, which failed
to take control of the country and led to a
withdrawal in disgrace, heralded the collapse of the
ruling communist government and in 1991 the Union
was dissolved.
Thanks for reading
Goodies to Go!