Friday, March 29, 2024

Goodies to Go ™
June 23, 2003– Newsletter #238


Goodies to Go ™
June 23, 2003–Newsletter #238

This newsletter is part of the internet.com network.
http://www.internet.com
 


Featured this week:

* Goodies Thoughts Counting
Visitors Counts
* 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.

 

http://books.internet.com/books/0789727803

 

 


Goodies Thoughts
Counting Visitors
Counts



Questions frequently come in about the value of counting visitors to your site.
The focus of these questions seems primarily to be on whether or not to count,
whether or not there is any real value to the information that counting
provides, and how best to accomplish the counting if you’re going to count.

The first two parts are closely related, so I’ll address them together. If you
are interested in knowing how many people are visiting your site, count them.
This may seem obvious, but there really is some dispute out there that seems to
be centered on whether or not to count visitors. If you look closely at the
arguments back and forth, however, you’ll notice that the focus is really more
on how to count, rather than whether or not to count. There is frequently
confusion on this point, but take it from me — at some point you’ll want to
know how many people are coming to see your site!

If your site is a commercial venture, then the count becomes even more
important. This applies whether the commercial nature is one of selling a
product or one of advertising. There are plenty of sites that started off life
as simply a means of providing a service to people, then grew into such popular
sites that they have supported commerce and/or advertising. HTML Goodies is a
great example of this. When it comes to advertising, it is the statistical
information regarding visitors that says everything to a potential advertiser.

Once you have decided to begin counting, there comes the question of how to do
it. First, let me describe a method that I do not recommend. That would be any
method that includes a visible counter. With a few exceptions (which might
include your site!), seeing a counter on a site does not provide useful
information to the visitor. It is my belief that this is the test for whether or
not something should be visible of the site. Being visible could also make it
counter-productive (sorry, I never could resist a pun!) Imagine you have a site
that sells cars and has a visible counter. You don’t know what kind of volume
your site’s visitor believes your site should be getting, so let’s suppose they
believe it should be a higher number than your counter shows. The message to
that visitor is "these cars are moderately popular" or even "unpopular". This is
probably not what you want to convey.

Hidden counters can be driven by a CGI script that logs to a file, or could be
driven by a service, or could be based on the web servers log files. There are
lots of hit counter scripts available on the net, but I have to say that I am
not a great fan of this method. The service method can provide so much more
information to you and is certainly easier to implement. You also have no need
to worry about compatibility with your web host’s server technology. Check out
http://www.thecounter.com  At The
Counter you can get a pretty comprehensive set of stats about your visitors for
a very modest fee. There are also step by step instructions for you to implement
the code (which is provided) on your site.

The last method I mentioned is to base your statistical analysis on the web
server’s log files. This is probably the most powerful method, providing the
broadest range of statistical analyses and graphs. It is also the most
expensive. To analyze a server’s log files comprehensively is quite a task —
one that you would probably not want to take on as a programming challenge for
yourself. Instead, you would want to use a Web Statistical Analysis program
product. Net IQ has a product called Webtrends that is great for analyzing log
files. They also offer a variety of service based products. You can check out
their site at http://www.netiq.com/ 
(the Webtrends product is detailed at

http://www.netiq.com/products/wrc/default.asp
)

If your site is to develop as an advertising medium, you visitor stats will be
one of the more valuable properties of the site. In advertising, numbers are
everything.
 




Thanks for Reading!
– Vince Barnes


 

Top

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. I currently have an ‘Inquire’ page which I want to calculate quotes
for prospective customers. At the moment the form just E-Mails the results to
me, but I want it to Auto-Calculate a quote as the user selects/de-selects
certain items (which vary in costs). This is basically a shopping list concept,
but I want it all on one page.

A. Here is an example of an order form that I put together a couple of
years ago. I collects the information in one form and then formats it and sends
it using another form. As you select an item and then the quantity it will
update the amount. Take a look at it and see if it helps.
<html>
<head>
<title>Order Form</title>
<SCRIPT LANGUAGE="JavaScript">
function calcamt(num)
{
var qtynum=eval("document.myform.qty"+num+".selectedIndex")
var number=eval("document.myform.szeshp"+num+".selectedIndex")
var sizeshape=eval
("document.myform.szeshp"+num+"[number].value.split(‘,’)")
eval("document.myform.price"+num+".value=sizeshape[1] * qtynum")
var pricenum=parseFloat(eval
("document.myform.price"+num+".value"))
var whole = "" + Math.round(pricenum * Math.pow(10, 2));
var decPoint = whole.length – 2;
if(decPoint != 0)
{
result = whole.substring(0, decPoint);
result += ".";
result += whole.substring(decPoint, whole.length);
}
else
{
result = whole;
}
eval("document.myform.price"+num+".value=result")

totalamt()
}
function qtyreset(numa)
{
if(eval("document.myform.item"+numa+".checked"))
{
}
else
{
alert("You must select the item")
return false
}
eval("document.myform.qty"+numa+".selectedIndex=0")
eval("document.myform.price"+numa+".value=’0.00’")
}
function totalamt()
{
var tempamt=0
for(i=0;i<3;i++)
{
var tamt=parseFloat(eval("document.myform.price"+i+".value"))
tempamt=tempamt+tamt

}
var whole = "" + Math.round(tempamt * Math.pow(10, 2));
var decPoint = whole.length – 2;
if(decPoint != 0)
{
result = whole.substring(0, decPoint);
result += ".";
result += whole.substring(decPoint, whole.length);
}
else
{
result = whole;
}
document.myform.totamt.value=result
}
function Formcheck()
{
document.sendit.sdata.value="r Item
Size Qty Pricer"
for(i=0;i<3;i++)
{
if(eval("document.myform.item"+i+".checked"))
{
var fitem=eval("document.myform.item"+i+".value")
var fnum=eval("document.myform.szeshp"+i+".selectedIndex")
var fsize=eval
("document.myform.szeshp"+i+"[fnum].value.split(‘,’)")
var fqtynum=eval("document.myform.qty"+i+".selectedIndex")
var fqty=eval("document.myform.qty"+i+"[fqtynum].value")
var fprice=eval("document.myform.price"+i+".value")
document.sendit.sdata.value+="r"+fitem+" "+fsize[0]
+"@ "+fsize[1]+" each "+fqty+" "+fprice+"r"
}
}
document.sendit.sdata.value+="Total
Amount="+document.myform.totamt.value
}
</script>
</head>
<body bgcolor="lightgreen">
<CENTER>
<BR>
<H2>Oder Form</h2>
<BR>
ITEM SIZE/SHAPE QTY PRICE
<FORM NAME="myform">
<INPUT TYPE="radio" NAME="item0" VALUE="Paper Clips"> Paper Clips
<SELECT NAME="szeshp0" onChange="qtyreset(‘0’)">
<OPTION VALUE="Small Paper Clips ,2.53" SELECTED>Small Paper
Clips</option>
<OPTION VALUE="Large Paper Clips ,3.45">Large Paper Clips</option>
</select>
<SELECT NAME="qty0" onChange="calcamt(‘0’)">
<OPTION VALUE="0" SELECTED>0</option>
<OPTION VALUE="1">1</option>
<OPTION VALUE="2">2</option>
<OPTION VALUE="3">3</option>
</select>
<INPUT TYPE="text" NAME="price0" VALUE="0.00" SIZE="10" onFocus="this.blur ()">
<BR><BR>
<INPUT TYPE="radio" NAME="item1" VALUE="Pencils "> Pencils
<SELECT NAME="szeshp1" onChange="qtyreset(‘1’)">
<OPTION VALUE="No2 Pencils ,1.23" SELECTED>No2 Pencils
</option>
<OPTION VALUE="No4 Pencils ,1.74">No4 Pencils </option>
</select>
<SELECT NAME="qty1" onChange="calcamt(‘1’)">
<OPTION VALUE="0" SELECTED>0</option>
<OPTION VALUE="1">1</option>
<OPTION VALUE="2">2</option>
<OPTION VALUE="3">3</option>
</select>
<INPUT TYPE="text" NAME="price1" VALUE="0.00" SIZE="10" onFocus="this.blur ()">
<BR><BR>
<INPUT TYPE="radio" NAME="item2" VALUE="Staples "> Staples
<SELECT NAME="szeshp2" onChange="qtyreset(‘2’)">
<OPTION VALUE="Small Staples ,2.12" SELECTED>Small Staples
</option>
<OPTION VALUE="Large Staples ,2.34">Large Staples </option>
</select>
<SELECT NAME="qty2" onChange="calcamt(‘2’)">
<OPTION VALUE="0" SELECTED>0</option>
<OPTION VALUE="1">1</option>
<OPTION VALUE="2">2</option>
<OPTION VALUE="3">3</option>
</select>
<INPUT TYPE="text" NAME="price2" VALUE="0.00" SIZE="10" onFocus="this.blur ()">
<BR><BR>
Total
<INPUT TYPE="text" NAME="totamt" size="10" onFocus="this.blur()">
</form>
<FORM NAME="sendit" METHOD="post" ACTION="mailto:mail@me.com?subject=Order
Form" ENCTYPE="text/plain" onSubmit="return Formcheck()">
<INPUT TYPE="hidden" NAME="sdata">
<INPUT TYPE="submit" VALUE="Send It"> <INPUT TYPE="reset" VALUE="Clear
Form" onClick="document.myform.reset()">
</form>
</center>
</body>
</html>

Q. I was asked recently to do a web site for a chauffeur company. I have
now finished it and he is asking for a price and I don’t know what proce to give
him. Any advice?

A. This was actaully the subject of a past Goodies to Go Newsletter. You
can read it here:
http://www.htmlgoodies.com/letters/221.html

Q. If my site uses the same images on all the pages, do I only preload on
the index page, or should I have each page preload all the images?

A. If they are all in the same directory for each page then you should
not have to pre-load them for each page. Once on the first page should do the
trick. You should be able to test this by commenting out the pre-load script on
another page and see if the images take longer to load.

 


Q.
I would like to eliminate the use of the Enter key that a user may enter
while in a TextArea. How can I do that?

A. Here is a script example that will ignore the enter key in a textarea:
<html>
<head>
<title>Test</title>
<script language="JavaScript">
IE5=document.all? 1:0
function stopkey(e)
{
whKey = !IE5? e.which:event.keyCode; // check for NS4 and NS6
window.status=whKey // Display ascii code in status bar
if(whKey==’13’) // check for ascii enter key (ascii)
{
return false;
}
}
</script>
</head>
<body>
<center>
<form name="myform">
<textarea name="txta" cols="30" rows="4" WRAP="hard"
onkeypress="return stopkey(event)" >Enter your response here</textarea>
</form>
</center>
</body>
</html>

 

 

 

 

Top

News Goodies


Supreme Court Upholds Anti-Porn Filters
[June 23, 2003] In a split vote, High Court rules CIPA not a violation
of free speech rights.

Click
here to read the article

 

Microsoft Launches New Pocket PC Software
[June 23, 2003] The latest version of the software giant’s handheld
operating system features built-in support for Wi-Fi and Bluetooth, as well
as a new name. Meanwhile, hardware partners parade new devices using the
software.

Click
here to read the article

 




Intel Debuts Faster P4, Announces New Itanium
[June 23, 2003] The No. 1 chipmaker dishes out the speed in its new 3.2
GHz desktop, and hints at a Madison-based server chip not mentioned in
previous roadmaps.

Click here to read the article

 

 

 

UPS, eBay Extend Shipping Pact
[June 23, 2003] The companies like each other’s company so much that they
are continuing their business relationship and collaborating on new services
to make online transactions easier.

Click here to read the article

 

 

New Bill Enlists FBI, DoJ in Copyright Battle
[June 23, 2003] Smith, Berman want federal agents to develop enforcement and
education programs to bolster Hollywood’s efforts to stop online piracy.

Click here to read the article

 

 



AT&T: IT Networks Not Up to Their Challenges
[June 23, 2003] Survey of 237 global IT officials by AT&T and The
Economist Intelligence Unit finds creaking across companies’ networks.

Click here to read the article

 



 

Jupitermedia Researches Wi-Fi Strategies
[June 23, 2003] The online media firm’s research arm will survey service
providers, vendors and end-users to map business opportunities in the Wi-Fi
hotspot market.

Click here to read the article

 

 

N.H. City Launches Chamber-Sponsored Hotspot
[June 23, 2003] Unwilling to wait for large ISPs to build Wi-Fi access
points in smaller cities, the Greater Portsmouth Chamber of Commerce
activates a free downtown hotspot.

Click here to read the article

 

 

Apple Lets G5 Cat Out of the Bag
[June 20, 2003] UPDATE: Mac fans may get their speed fix after all as the
company inadvertently posted the long-rumored upgrade to its processor line
on its sales site.

Click here to read the article

 

 

Cutesy Domain Names Making Online Fraud Easier
[June 20, 2003] Best Buy’s bogus e-mail fiasco is just the
latest in classic online shell game: ‘On the Internet, No
One Knows Who You Are,’ say experts.

Click here to read the article

 

 

 

 

Top


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

 

 

 

Top

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:

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
http://www.htmlgoodies.com/mentors/

We have received quite a few questions about web site
development at the newsletter feedback address again
recently. Please note that these questions cannot be
answered if sent to this address. Please send them to the
mentors instead (see

http://www.htmlgoodies.com/mentors
) Also note that we
can’t forward questions on to the Mentors because their
replies then come back to us instead of to the original
correspondent.
 

 

 

Top
And Remember This . . .

On this day in…



1992
Teflon Don Gets Life
On this day in 1992 Mafia boss John Gotti was sentenced
to multiple life terms of imprisonment without the
possibility of parole after being found guilty on all counts
including conspiracy to murder Paul Castellano. Paul
Castellano had been the boss of New York’s Gambino family
until he was murdered outside a restaurant in Manhattan in
1985. Gotti took over and the Gambino family’s power rapidly
increased to become allegedly the most powerful Mafia family
in the US. He was charged with several crimes in the 80’s
but always managed to avoid conviction, mostly with the aid
of witness intimidation. His ability to avoid conviction
earned him the nickname "the Teflon Don", since nothing
would stick to him. That is, until his colleague Sammy "The
Bull" Gravino turned on him and agreed to testify against
him in exchange for a reduced sentence.

Born today were: in 1894, The Duke of Windsor, Edward
Patrick David; 1910, news reporter Edward P. Morgan;
1927, director and choreographer Bob Fosse; 1940,
singer Adam Faith (Terence Nelhams); 1940, Olympic
track and field Gold Medalist Wilma Rudolph; 1948 US
Supreme Court Justice Clarence Thomas;

 

 

 




Thanks for reading Goodies to Go!


 



Archive Home Page.


Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Popular Articles

Featured