Goodies to Go ™
November 17, 2003–Newsletter #259
This newsletter is part of the internet.com network.
http://www.internet.com
Featured this week:
* Goodies Thoughts – Table Tuning Time
* 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 – Table Tuning Time
Tables are always a hot topic in the HTML development arena. And
why wouldn’t they be?! They are an immensely powerful tool in the design
arsenal, providing one of the easiest ways to lay out information in an easy to
read and easy to understand format. They also provide a great way to place
different items relative to each other on the page. There’s a huge amount that
can be said about them, and it’s certainly not the intent to give a description
of all their capabilities in this newsletter! Instead, I want to take a quick
look at some particular features that solve a lot of the problems I am
presented.
I’ve got a sample table here and I’d like to point out that it is a sample for
illustration purposes only – the numbers in it were invented in my household and
have no basis in anything to do with reality (unless by extreme coincidence or
divine providence!)
First, here’s the table code:
<table border="1" style="border-collapse: collapse" bordercolor="#111111"
width="300">
<tr>
<td width="25%" rowspan="2"> </td>
<td width="50%" colspan="2">
<p align="center">Sometimes Drink</td>
<td width="25%" rowspan="2">
<p align="center">Add<br>
Sugar</td>
</tr>
<tr>
<td width="25%" align="center">Coffee</td>
<td width="25%" align="center">Tea</td>
</tr>
<tr>
<td width="25%" align="center">Males</td>
<td width="25%">70%</td>
<td width="25%">15%</td>
<td width="25%">35%</td>
</tr>
<tr>
<td width="25%" align="center">Females</td>
<td width="25%">60%</td>
<td width="25%">40%</td>
<td width="25%">40%</td>
</tr>
</table>
For your convenience, there’s a copy of it in a sample page here:
https://www.htmlgoodies.com/examples/tablesample.html
If you’re not familiar with html tables, you can get to know them through the
tutorial series here:
https://www.htmlgoodies.com/tutors/tbl.html
In this sample table you’ll notice that I have set the table’s width to 300
pixels with width="300" in the <table> tag. From that point on I use percentages
to specify the width of the cells, etc., so that should I choose to change to
overall size of the table, the cells would continue to occupy the same
proportion of the available space within the table.
The table has four rows defined (that’s the four <tr> </tr> tag pairs.) Looking
at rows three and four you can see that there are also four table data columns
defined (the <td> </td> tag pairs.) Each of the columns is defined as 25% of the
available width (which, as previously mentioned, was set in the <table> tag.)
The first two rows illustrate one of the really useful features of table
formatting. This is the ability to define a cell that occupies more than one
row, or more than one column by use of the rowspan and colspan attributes. You
could also similarly span both multiple rows and multiple columns with a single
cell.
In the first row, the first and last cells are each defined as spanning two
rows. The second cell is defined as spanning the two center columns. When it
comes to the third row, the outer two cell spaces have already been taken by the
double row cells in the first row. Consequently, there are only two cells
defined, being those that occupy the two central columns.
Personally, I find it very useful to sketch out a table on squared paper before
I write its code. That way I can see where the cells will span multiple rows
and/or columns, as well as where there are fewer cells specifications needed. If
you put an extra cell into your table, all kinds of strange things can happen to
it! It sometimes can lead to a real headache when trying to find such an error!
That’s when the sketch comes in really handy!
Do you know what "deprecated" means? Find out next week as we look at a newer
and better definition for this table.
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 trying to set up a clock that will count down from 72 hours
: minutes : seconds over and over again. Can you tell me how I might do that?
A. Joe Burns’ book "Javascript Goodies" referred to a count down script
on the web site. Its still on the server here:
http://htmlgoodies.earthweb.com/JSBook/countdn.html
It only counts minutes and seconds, but with a little tweaking it could be set
to do what it appears you want it to do.
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:
border="0"
Q. Is there any way to place text on top of pictures?
A. Here is the link to see how that’s done:
https://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 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")
asplObj.Group("management")
asplObj.Group("administrators")
asplObj.User("Fred")
asplObj.Protect
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):
<body>
<table height="100%" width="100%">
<tr><td valign="center" align="center">
<table height="__" width="__" background="image.jpg">
Any text on the background
</table>
</td></tr>
</table>
</body>
News Goodies
EC Digs Deeper into Oracle-PeopleSoft Fight
[November 17, 2003] UPDATE: The European Commission will
open up a ‘phase two’ inquiry into the $7.5 billion hostile bid
even as the U.S. Department of Justice continues to look into
it.
Click
here to read the article
GSA Severs Ties With PC Connection
[November 17, 2003] Sales of unqualified items and the underpayment of
required fees prompts possible Dept. of Justice review.
Click here to read the article
GAO Report Targets IRS Security Weaknesses
[November 17, 2003] Persistent problems place confidential data at risk of
hack attacks and inappropriate disclosure.
Click here to read the article
‘SmartScreen’ Spam Filter Ready for Exchange
[November 17, 2003] Microsoft’s spam-filtering technology will be ready as
an add-on for the Exchange message platform early next year.
Click here to read the article
JBoss Indemnifies Its Customers
[November 17, 2003] Following the lead of HP, and creating its own lead in
the Java world, the consulting company will indemnify its customers from
future patent claims.
Click here to read the article
‘Royale’ Reborn as Macromedia Flex
[November 17, 2003] The Web graphics software maker tries to
make inroads with a J2EE-friendly development tool for
application software that sits on the presentation tier.
Click here to read the article
Adobe Rolls Out Acrobat Elements Server
[November 17, 2003] Moving forward in its goal to Web-enable documents,
Adobe makes it possible for PDF files to be deployed on servers across
enterprises.
Click here to read the article
Shopping.com Spreads "No Buyer’s Remorse" Message
[November 17, 2003] Price comparison site tests the power of offline media
to drive online behavior.
Click
here to read the article
Huawei-3Com Open Joint Venture
[November 17, 2003] Clearing legal and regulatory hurdles, the
collaborative effort between network gear makers is reality.
Click here to read the article
SCO Goes After The Father Of Linux
[November 14, 2003] Linus Torvalds and others are being asked to show what
they know as part of SCO’s lawsuit against IBM. Analysts say it’s a
smokescreen.
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:
Implementing Paging and XSLT Extensions Using XSLT in
.NET – Part 1
http://www.15seconds.com/issue/031105.htm
Learn how to transform XML data into HTML by using an XSL
stylesheet from within a .NET application, and then
implement a paging solution by declaring and supplying
paging parameters to the stylesheet.
*** And ***
XSLT Support in the .NET Framework
http://www.asp101.com/articles/jayram/xslt/default.asp
This article provides an overview of the .NET Framework’s
support for XSLT and illustrates using the XSLT features
present in .NET to perform data transformations.
Top
And Remember This . . .
On this day in…
1869 Suez Canal Opened
Not then the major shipping lane that it now is, the Suez was only
25 feet deep, 72 feet wide at the bottom, and 200 to 300 feet wide
at the surface when it opened on this day in 1869. The opening
ceremony was attended by French Empress Euginie, wife of Napoleon
III. In its first year of operation less than 500 ships sailed its
length between the Mediterranean and the Red seas. The Suez Canal
has been the subject of many disputes and has been closed several
times in its history. In 1875 Britain bought out the Egyptian
governor’s stock in the canal and as the major stockholder,
undertook major improvements to the canal. Today about 50 ships
daily navigate the canal, carrying 300 million tons of goods
annually.
Today was also the day that: in 1558 Elizabeth I ascended the
throne of England; 1800 the US Congress held its first
session; 1927 a tornado hit Washington DC; 1948
Britain nationilzed their steel indstry; 1967 Beetles Ltd.
and Apple Music Ltd. swapped names; 1973 President Nixon said
(to AP) ".. people have got to know whether or not their President
is a crook. Well, I’m not a crook."; 1980 John Lennon
released "Double Fantasy" album in the UK; 1988 Benzir Bhutto
elected in Pakistan; 1993 US Congress voted in favor of the
North American Free Trade Area (NAFTA);
Born today were: in 1755 King Louis XVIII of France; 1790
mathematician August Ferdinand Mobius; 1925 actor Rock
Hudson; 1937 comedian Peter Cook; 1938 folk singer
Gordon Lightfoot; 1942 film director Martin Scorsese; 1943
model/actress Lauren Hutton; 1944 actor/director Danny De
Vito; 1958 actress Mary Elizabeth Mastrantonio; 1964
Cuban video jockey Daisy Fuentes; 1964 US figure skater
Marina Tcherkasova; 1980 musician Clarke Isaac Hanson;
Thanks for reading Goodies to Go!