Goodies To Go! Newsletter #355

By Vince Barnes


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

Goodies to Go (tm)
September 20, 2005 -- Newsletter # 355
This newsletter is part of the internet.com network.


Featured this week:
*   Goodies Thoughts - Not Logic

*   Q & A Goodies
*   News Goodies
*   Feedback Goodies
*   Windows Tech Goodie of the Week 
*   And Remember This...
Not Logic
Josh was reading a tutorial on the website at http://www.htmlgoodies.com/primers/jsp/article.php/3478421 and felt inspired to send me a question.  He asked "I was looking at article number 29.  You have a test for zip code.  It says if (x!=5 && x!=10) .....  Shouldn't this be OR and not AND??"  Great question, Josh, and thanks for sending it in.
This question highlights a very common programming error, which stems from our everyday speech.  In normal conversation we have a tendency, when it comes to asking questions involving negatives, to incorrectly form the question, and to rely on the listener to correctly interpret the meaning.  Listen to what I mean, not what I say, so to speak.
Here's an example: "Is it true that it's not red or black?"  If we look at it and see that it's green, we will say yes.  But what if we see red?  We will tend to say that it's false, but we would be incorrect, logically speaking.  Here's why: expand the question to include all the implied words and we get "Is it true that it's not red or that it's not black?"  If it is red it will fail the first part of the test, but it will pass the second (it is not black.)  Our question actually asked if a OR b was true, so the correct answer is "yes, it is true."  In fact, the answer to the question is going to be yes no matter what color it is!
What if we had asked "is it true that it's not red and black?"  Our everyday interpretation is now going to be looking for something that has both colors.  This makes it hard to ask the question correctly.  Maybe we should ask "is it true that is not red and that its not black?"  Hmmm.... that looks familiar!  That's how the question is asked in the tutorial -- it seems Joe got it right!
When it comes to negatives, our thinking can quite quickly become befuddled!  Try asking yourself "isn't it true that that's not quite what I didn't actually ask?"  Spend too much time with questions like that and your brain will resemble spaghetti!  Computers, on the other hand, will simply follow the logic -- not matter what we really meant.  The trick is to use negatives sparingly and with caution.
Thanks for not ignoring!

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

Q. How do I lose the blue line that appears round an image when I make it a link?
A. In the IMG SRC tag add this:

Q. Is there any way to place text on top of pictures?
A. Here is the link to see how that's done: http://www.htmlgoodies.com/tutors/textonimages.html
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 every time 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).
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

Q. I want to change the background color of a cell containing a link, but only when the mouse is on that link. Then it should go back to the original color.
A. I've had trouble changing background colors in table cells with links, so I stopped using table cells. You can change the display to "block" to make the links look like buttons.
<title>Table Cell Links</title>
<style type="text/css">
a { display: block;
width: 150px;
background-color: red;
color: white; }
a:hover { background-color: blue; }
<p><a href="link.htm">LINK TEST</a></p>
<p><a href="link.htm">LINK TEST</a></p>
<p><a href="link.htm">LINK TEST</a></p>
<p><a href="link.htm">LINK TEST</a></p>
<p><a href="link.htm">LINK TEST</a></p>
There are a lot of things you can do with the styles, but I hope this helps for starters!
News Goodies
Microsoft in Trouble With EU Again?
[September 20, 2005] UPDATED: Redmond could be facing another round of tough sanctions.
Read the article:

Sun Flares with New UltraSparc
[September 20, 2005] The UltraSparc IV+ runs circles around its predecessor as Sun looks to boost its standings in the Unix market.
Read the article:

Not All Hype About eBay-Skype
[September 20, 2005] The good news is that the big eBay-Skype deal isn't the only buzz-worthy topic at this year's VON show. But it still dominates. 
Read the article:

Citron Calls For Broadband Bill of Rights
[September 20, 2005] Vonage's CEO wants a set of guidelines for regulators to follow
Read the article:

Cisco Elbows For SMB Web Conferencing
[September 20, 2005] Cisco and Macromedia are merging their audio and Web conferencing solutions into a product aimed at SMBs.
Read the article:

Microsoft Sues 8 Resellers Over Fakes
[September 19, 2005] Redmond looks to halt the piracy of its software.
Read the article:

The New Linux Standard
[September 19, 2005] LSB 3.0 is released with wide support in the fight against Linux fragmentation.
Read the article:

Intel, Oracle Power Electric Sports Car
[September 19, 2005] UPDATED: The car uses Intel chips, WiMax and Oracle database software to communicate.
Read the article:

Sununu: IP Community Should Speak Up
[September 19, 2005] In the wake of Hurricane Katrina communication problems, Sen. John Sununu says IP advocates have an important story to tell.
Read the article:

Avaya Buys Into P2P VoIP
[September 19, 2005] The company acquires P2P VoIP vendor Nimcat for approximately $40 million.
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 
Building an Image Keyword System
Unlike text-based file formats image files aren't made up of words, which makes searching for an image file by keyword difficult. Instead of being able to simply open the file to see what it contains, we're stuck looking at the text around it and other metadata to determine the image's meaning.
In this article, Ziran Sun shows you how to build a simple database-based image keyword system that allows you to associate keywords with images and use these keywords to make finding images easier.

*** AND ***

List Control Items and Attributes
In this article we'll look at how, exactly, list controls are rendered.
We'll then see how to extend the list control classes to enable attributes of the control's ListItem instances. Then we'll look at a real-world demo that illustrates how to have a CheckBoxList with a "None" checkbox option that, if checked, uses client-side script to automatically uncheck all other CheckBoxes in the list. Read on to learn more!

*** AND ***

Dynamic Form Fields ASP.NET Sample
In addition to the primary goal of programmatically creating and adding server controls to a web form dynamically, this script also illustrates a number of other cool .NET concepts including: using an ArrayList to populate a DropDownList, building a string using a StringBuilder, and hiding sections of a page using the Panel web control.

And Remember This ...
1946 The First Cannes Film Festival
If you ask me, it's one of the main reasons for visiting the French Riviera - that, and pretty much everything else about the Riviera!  Delayed by World War II (it was originally to debut on September 1 1939, but Hitler invaded Poland that day) the Festival de Cannes began on this day in 1946 as a promotion to bring tourists back to the South of France and the Riviera.  By the 1950's the Festival International du Film de Cannes had become the most prestigious film festival in the world.  Attended by more than 30,000 people each year, it is still regarded as such by most people in the industry.

Today was also the day that in: 1664 Maryland enacted the first anti-amalgamation law to prevent widespread intermarriage of English women & black men; 1797 The US frigate Constitution (Old Ironsides) was launched in Boston; 1830 first National Black convention met in Philadelphia; 1881 Chester A. Arthur was sworn in as President of the US; 1884 the Equal Rights Party nominated female candidates for President and Vice-President of the US; 1954 the first computer program written in FORTRAN was run; 1958 Martin Luther King Jr was stabbed in the chest by a deranged black woman in New York City; 1960 the United Nations General Assembly admitted 13 African nations, along with Cypress, bringing the total of member countries to 96; 1962 James Meredith was prevented from entering Mississippi University as its first black student; 1972 police found cannabis growing on Paul and Linda McCartney's farm; 1973 Billy Jean King beat Bobby Riggs in the "Battle of the Sexes" tennis match; 1975 David Bowie's "Fame" hit #1 (stayed for two weeks); 1977 Voyager 2 was launched, the mission completed fly-by passes of Jupiter, Saturn, Uranus and Neptune; 1985 Orlando's Walt Disney World welcomed its 200 millionth guest; 1990 East and West Germany ratified their reunification;
Born today were: in 357 BC Emperor, King Alexander III the Great of Macedonia; 1885 jazz pianist and composer Ferdinand (Jelly Roll) Morton; 1927 actress Rachel Roberts Wales; 1928 pop psychiatrist Dr. Joyce Brothers; 1950 actress Debi Morgan Dunn; 1951 actress JoAnna Cameron; 1957 comedienne/actress Fran Drescher; 1959 musician Alannah Currie; 1967 singers Gunnar and Matthew Nelson;

  • 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