/introduction/newsletter_archive/goodiestogo/article.php/3594101/Goodies-To-Go-Newsletter-381.htm Goodies To Go! Newsletter #381

Goodies To Go! Newsletter #381

By Vince Barnes

                      Goodies to Go (tm)
               March 21, 2006 -- Newsletter # 381
     This newsletter is part of the internet.com network.
          Please visit http://www.htmlgoodies.com
A Note about Email Filtering:
All Goodies To Go newsletters are sent from the domain "internet.com."  Please use this domain name (not the entire "from" address, which varies) when configuring e-mail or spam filter rules, if you use them.

Featured this week:
*   Goodies Thoughts - Webstats ABC
*   Q & A Goodies
*   Discussion Goodies
*   News Goodies
*   Feedback Goodies
*   Windows Tech Goodie of the Week 
*   And Remember This...

Webstats ABC

When it comes to the question of Website visitor Statistics, there seems to be a wide division of opinion.  Does it really matter if you know how mnay people visit your site or does it not?  In my humble opinion, yes, it matters a lot!  The debates seem to be primarily focused 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

Q & A Goodies
Questions are taken from submissions to our Community
Mentors. You can ask a Mentor a question by going to

X                        X
X   Please take note:    X
X                        X
We have had a number of people indicate that their email client programs are interpreting code examples in this newsletter as actual HTML code instead of text.  To overcome this problem and to enable everyone to read the newsletter, there is a period after the "<" in each tag.  If you cut and paste to try out code examples, please remember to remove the periods.  Wherever we intend you to use "<." in your code, the example will show "<..".  In this way, you will be safely able to use a global edit to change "<." to "<".  Thanks to all of you for your patience with this; if this technique creates an undue problem for you however, please let us know via our feedback address (see Feedback, below).

*** This question was submitted to our Mentor Community.
    The answer was provided by one of our Mentor Volunteers
Q. I am constantly creating files (pdf or word) files that I need to show to many co-workers. Instead of having to email everyone everytime I finish a file, I would like to upload the file to my server and have them view the list of files online and download the ones they want. These files need to be password protected as different people in different departments should only see files pertaining to them. Here was my idea, create a bunch of password protected folders on a server - one for each department, and I will upload the file to any folder that should be allowed to view these files.  Two questions: 1) I put the files in a folder, but when I try to view the folder in a browser it tells me I don't have permission to access this folder (I assume because I never created an index file). How can I set it up that I should be able to view a list of files that are in the folder?  2) how can I create a page that will allow me to upload files to folders using a browser?
A. I believe you are correct in that you do not have an INDEX file for the server to show when you try to access the folder. You could create an INDEX file with the links to the documents for downloading. I am assuming that you have already password protected the folder? An even easier way would be to use a password log in feature for your pages. The application would allow users to sign up themselves and you would control which group the user should be in and only the documents or files you allow each group or person to view. There is a nice web application called ASPLogin. It has to run on a server that supports ASP. For example, to make a document available to all users in a group called 'management', members of a group called 'administrators' and a user called 'fred' (who may or may not be in either of the groups), you would add the following code to the top of the document:
<.%@ LANGUAGE=VBScript %>
Set asplObj=Server.CreateObject("ASPL.Login")
Set asplObj=Nothing
Any other group or person trying to see that document will not be allowed to see it. It is a pretty slick application You can take a look here: http://www.asplogin.com
To create a page to allow you to upload documents would call for some scripting. This all depends on what type of server you site is hosted on. If it is a Windows server then it will support Active Server Pages (ASP).

*** This question was submitted to our Mentor Community.
    The answer was provided by one of our Mentor Volunteers
Q. Is there was a way to position a background image in the center of a page regardless of screen resolution?
A. This code will position the image in the center:
body {
      background-image : url(image.jpg);
      background-position : center center;
      background-repeat : no-repeat;
To position in the center of a table, try using this (be sure to replace __ with the height and width of the image):
<.table height="100%" width="100%">
<.tr><.td valign="center" align="center">
<.table height="__" width="__" background="image.jpg">
Any text on the background

*** This question was submitted to our Mentor Community.
    The answer was provided by one of our Mentor Volunteers
Q. I want to have a small window open when someone clicks a link on my page.  I don't want a full size window, just a small one.  Can JavaScript do this?
A. Since you will probably have more than one link on a page you should set up a function in your head section of your document that will be used by multiple links.  You can pass the html page you want to load in the window to the function when the link is clicked on.  With window.open() you can set the
width, height, postion and other attributes.  Here is an example:
<.script language="javascript"> function OpenWin(linkid)
    {  NewWin=window.open (linkid,"newwin",config="width=200,height=250,location=no,status=no,directories=
The variable "linkid" contains the page you want to load.  This was passed to the function when the link was clicked on.  Then in the body section of your document your link could look like this:
<.A HREF="javascript:OpenWin('somepage.html')">Apples<./A>
You would wrap the link around the word that you want to click on for more info.  The HTML Goodies site does have a tutorial on window.open()
(see http://www.htmlgoodies.com/primers/jsp/hgjsp_11.html and http://www.htmlgoodies.com/primers/jsp/hgjsp_12.html  -- Ed.)

*** This question was submitted to our Mentor Community.
    The answer was provided by one of our Mentor Volunteers
Q. I read through the tutorials on FORMS. I want to know how, when people click the SEND button, do I send mail automaticcally instead of it opening up OUTLOOK?
A. (Version 6 Browsers don't support email forms. - Ed.)
You are going to need some server side coding for this to work. And it depends on what your server supports. Most hosting packages support some kind of script to send email from a web form. Most free hosting sites do not. It all depends on what your server supports. If your server supports Active Server Pages (ASP) then you can use ASP to send email. If your server supports CGI or PERL then you can use that to send email.

*** This question was submitted to our Mentor Community.
    The answer was provided by one of our Mentor Volunteers
Q. Is it possible to link directly to an Inline Frame, so that when I click a hyperlink on the main page, only the contents of the Inline Frame change?
A. Just give your Iframes names and then in your link code add the link target name like so:
<.IFRAME NAME="iframe2" SRC="iframe2.html" ALIGN="" HEIGHT="" WIDTH="">
<.a href="somepage.html" target="iframe2">Your Link Here<./a>

*** This question was submitted to our Mentor Community.
    The answer was provided by one of our Mentor Volunteers
Q. What function returns the square root of a number?
A. That would be Math.sqrt(arg) where arg is your numeric variable.  There is a whole list of Math Object methods in Joe's book starting at the bottom of P159.

Discussion Goodies
Have you seen the discussion forums on the HTML Goodies website?  It's a great place to get help from others who, just like you, are developing web pages.  Many different topics appear in the forum, and a new one will appear if you create it!  Here's a sample of recent topics:
the prerequisit for using sms and mms plz:

News Goodies
Sprint Nextel Targets Florida Pretexter
[March 21, 2006] The company is in legal pursuit of a PI firm illegally obtaining confidential phone records.
Read the article:

Verizon's Broadband Regulatory Relief
[March 21, 2006] The decision forces Verizon's competitors to commercial market to negotiate rates.
Read the article:

Grid Computing For Sale, PayPal Accepted
[March 21, 2006] Sun opens up its grid utility for public use over the Internet.
Read the article:

HP Pushes Integrity Sans Montecito
[March 21, 2006] The company also announces Global Instant Capacity for HP-UX 11i. 
Read the article:

Gates Mixes It Up With IE, Atlas
[March 21, 2006] Gates & Co. show off how their pending applications will help customers build better Web sites.
Read the article:

Borland Picks Up The Gauntlet
[March 21, 2006] The software developer adds build management to its growing development portfolio.
Read the article:

Cray Looks to Adaptive Supercomputing
[March 21, 2006] Cray says it will take computing to a new level.
Read the article:

Red Hat Fedora Core 5 Released
[March 20, 2006] Bleeding-edge Linux distro cuts a new release.
Read the article:

Microsoft Looks to Give Phishers The Hook
[March 20, 2006] The software giant triggers law enforcement action on more than 100 phishing cases in EMEA.
Read the article:

Linux 2.6's Sweet Sixteen
[March 20, 2006] Linux kernel 2.6.16 released including support for Oracle-clustered file systems and expanded support for the Cell processor.
Read the article:

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 helps 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/

Thanks for all your feedback!

Windows Tech Goodie of the Week 
Custom Paging in ASP.NET 2.0 with SQL Server 2005
A common pattern in web development is providing paged access to data. In this article we'll look at how to implement custom paging in ASP.NET 2.0 using SQL Server 2005's new ROW_NUMBER() feature.

*** AND ***

Database-Driven Auto-Navigation Login & Password ASP.NET Sample Code
This login & password sample is similar to our plain database-driven login & password sample, but it adds the capability to have users automatically directed to a user-specific login page upon authentication. It also includes a simple script that will allow you to see what user you are currently logged in as in order to help you troubleshoot any problems you may have.

*** AND ***

A Step-by-Step Guide To Using MySQL with ASP.NET - Part 3
In the third part of his series on using MySQL with ASP.NET, Ziran Sun provides a C# version of his ASP.NET 1.x sample query page, explains how to connect to MySQL using ASP.NET 2.0's new fully declarative data binding model, and provides a solution to those pesky namespace not found errors.

And Remember This ...
1788 A fire in New Orleans, Louisiana destroyed 856 buildings; 1868 The first professional women's club in the US, Sorosis, was formed in New York; 1871 Journalist Henry M. Stanley began his expedition to Africa ("Dr. Livingston, I presume."); 1891 A twenty year old family feud started by an accusation of pig stealing ended as a Hatfield married a McCoy; 1934 A fire destroyed Hakodate, Japan, killing about 1,500 people; 1935 Persia was officially renamed as Iran; 1961 The Beatles made their first appearance at the Cavern Club in Liverpool, England; 1963 The Federal Penitentiary on Alcatraz Island in San Francisco Bay closed; 1964 The Beatles' "She Loves You" hit #1 (stayed there for two weeks); 1975 Ethiopia ended it's 3,000 year old monarchy; 1980 JR Ewing was shot on the TV soap opera "Dallas";

Born today were: in 1685 German composer Johann Sebastian Bach; 1816 English novelist Charlotte Bronte; 1902 musician Eddie James "Son" House; 1906 Oil magnate / philanthropist John D. Rockfeller III; 1916 novelist Harold Robbins; 1918 sportscaster Howard Cosell; 1929 actor James Coco; 1943 English musician Vivian Stanshall (Bonzo Dog Do-Da Band); 1946 Welsh actor Timothy Dalton; 1950 English musician Roger Hodgson (Supertramp); 1962 actor Matthew Broderick; 1962 comedienne Rosie O'Donnell;

EarthWeb's family of online services for IT insiders
IT MANAGEMENT http://www.earthweb.com/dlink.index-jhtml.72.949.-.0.jhtml

  • 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