Goodies to Go (tm)
March 17, 2003-- Newsletter #224

By Vince Barnes



Goodies to Go (tm)
March 17, 2003--Newsletter #224

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


Featured this week:

* Goodies Thoughts - Folders and Directories
* 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 - Folders and Directories



When I take a look at my desk I am amazed by the amount of junk it accumulates. Obviously, it's the desk doing the accumulating -- it couldn't be me, right? I have piles of papers here and there that would, to any outsider, look like a total mess. "To any outsider" because -- well, I'm reminded of an old gag about Sherlock Holmes yelling at his housekeeper for destroying the dates on all his files -- "I only cleaned up the place a bit," she protested. "That may be," replied Sherlock, "but it was the thickness of the dust that told me the date of the file!" On my desk, I can find anything I need to really quickly! I know a lot of you are the same way.

Look in my computer, however, and you will not see the same thing at all! In there, all my documents are neatly ordered in a logical hierarchy of folders that a rank amateur could traverse in a heartbeat! In there you will find no trace of the apparent chaos seen on my desk.

In my attempts to rationalize this dichotomy, I have come to the conclusion that, say what you might about it, paper (yes, it's the paper this time -- it couldn't be me, right?) simply doesn't lend itself to real organization!

I think the truth might have a little more to do with the fact that paper tends to be transient in my life. I only have a few personal letters that date back more than a few years. Everything else has gone by the wayside. Computer files though, partly because they are so easy to copy and to move around, seem to have a more permanent nature. I have plenty of files that are now past their teens. My PC has files on it that originated on heavy iron mainframes, back in the day! It is this characteristic that led me to thinking of the organization of files in a website.

We keep a web site in a directory (just as a side note - I am going to use the words "folder" and "directory" to mean the same thing and to be interchangeable, which, in the context of today's computers, they essentially are.) The website, however, has a number of different component parts that could be compartmentalized, and kept in a hierarchy of directories.

In the early days of the web, when pages were long, linear documents, designed to be read from top to bottom with lots of scrolling, folks came up with the idea of putting all the picture files into a directory all of their own, frequently called either "images" or "imgs". Not a bad idea, but certainly only the beginning.

Organizing the pages within a site into a series or hierarchy of folders holds even greater promise. Imagine a site about books, that has a section for science fiction. The introductory pages and site directory pages could be in a folder called "books" within which there could be a folder called "science_fiction". The underscore separating the words is a option used where a hyphen or space would be problematical. Some Unix systems would be examples of this. If the main page in the science fiction directory was a default document file name, such as "index.html" (actual default file names can vary from server to server - check your web host if you're not sure) then it could be addressed as (assuming the site is www.books.com) www.books.com/science_fiction without having to add the name of the file to the end of the URL (www.books.com/science_fiction/index.html). This provides much more friendly navigation for the site visitor, as well as keeping the files nicely organized. If the category "science fiction" was broken into "science fiction" and "science fact" we could create a hierarchy where "books" contains a folder called "science", and "science" contains folders called "fiction" and "fact". The lower directory pages (assuming default file names) could now be addressed as "www.books.com/science/fiction" and "www.books.com/science/fact". Keeping the images associated with page in their own directory still seems like a good idea, except that in my humble opinion, there should be an "images" directory in each of the directories containing page files, to hold the images used in those pages. Images used in lots of pages (such, for example, as logos) should be kept in an image directory at the highest level in which they are used.

This leads also to the question of reference, as in, how to refer to (use in a page) an image file that is held in a higher directory. This is covered in our tutorials, but the easiest means is to use the reference "../" - dot dot slash, which means "my parent folder". For example, a page in our "fact" folder could refer to an image in an "images" folder within the "science" folder as "../images/filename.ext" - (my parent folder's images directory"/filename). If the file logo.jpg was in a folder called "imgs" in the "books" root (the site's highest level folder) folder, then our page in the "fact" folder would reference it as "../../imgs/logo.jpg" (my parent folder's parent folder's imgs directory.)

Other things you use in your site, such as music files or applets, could also be kept in their own directories. When you organize your files in a way that makes sense to you, you will find that maintenance in the future is a much easier task.

Getting back to my desk for a moment -- I am forced to admit the possibility (remote as it may be) that I am basically a messy guy, IRL!!


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 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=
no,toolbar=no,scrollbars=no,menubar=no,resizable=no,top=30,left=30");
NewWin.focus()
}
</script>
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.)





Q. I read through the tutorials on FORMS. I want to know how, when people click the SEND button, do I send mail automatically 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.




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>




Q. I want to build a site where people can download documents (.pdf) where do I start?

A. You want to build a site where people can download PDF documents...is a little broad. Do you want to know how to build the site? Do you want to know how to offer the files for download? Do you know HTML? Are you familiar with building websites at all? We can certainly help you with these different aspects but we can't take you step by step through this email. We are only here to help with the areas in which you get stuck. If you are just starting out then the first place to start is here: http://htmlgoodies.earthweb.com/primers/primer_1.html
To allow people to download PFD files or any other file, just create a link to that file. If the person has the program to read the document it is possible that it will open right from the web. To avoid this you can either place the file in a ZIP file or tell the user to right click and choose "Save target as..."




Q. I'm looking for resources for designing pages that easily compatible with a wide variety of browser types. I use Macromedia DreamWeaverMX which does offer some hints for making my pages more easily accessible to a wide range of people but I'm curious if there are any online or
>print resources out there that specifically address issues like the use of certain tags and possible alternatives, the formating of text and pictures, etc.

A. Here are a couple of sites that I use for browser compatibility:
http://www.netmechanic.com/browser-photo/tutorial.htm
http://hotwired.lycos.com/webmonkey/reference/browser_chart/
http://www.anybrowser.com/
I get quite a bit of information from the first link, Netmechanic.


 


Q. I have been working on trying to come up with a better menu for my index page. I used Sothink DHTMLMenu to generate one. I have it working, but it takes quite a while for the menu to load. What is my problem?

A. I can't see your menu, but I can make a couple guesses. You have a bunch of images that need to load to make the menu work. The browser looks for them when you do your mouseover, which means calling the server and asking for the image, and repeating the process for each image. My first guess is you could fix your problem with a preloader, so the images are already in the browser cache. Here's an example of a preloader:
// preload images
var an_image1 = new Image(151,37);
an_image1.src = "images/navigation/options_home_over.jpg";
var an_image2 = new Image(151,37);
an_image2.src="images/navigation/easement_over.jpg";
var an_image3 = new Image(151,37);
an_image3.src="images/navigation/mutual_over.jpg";
This is a JavaScript that declares a variable as an image and specifies the size so the browser doesn't have to figure it out, and then give the variable a value consisting of a URL.
My second guess is that your images are large and taking a long time to download. Keep them small, like 3k each, or even eliminate them if you can.
Get rid of the "best viewed at" message. No visitor will change their screen setting just for your site, nor take the blame for he site not working at their screen setting. You just have to make it work at different sizes.

 

 

 

 

Top

News Goodies


A Device Called WANDA
[March 17, 2003] Texas Instruments shops around a new concept design for a wireless personal digital assistant that combines LAN, Bluetooth, and GSM/GPRS technologies.

Click here to read the article



 

Verizon to Roll Out Wireless Broadband
[March 17, 2003] Verizon has Wi-Fi and 1xEV-DO high-speed wireless services coming to market later this year.

Click here to read the article

 



IBM, Cirque du Soleil in Services, Marketing Pact
[March 17, 2003] Cutting edge circus and entertainment company gets to work with an improved IT safety net, courtesy of Big Blue.

Click here to read the article

 

 

 

IDC: MSN Reining In ISP Aspirations
[March 17, 2003] By signing broadband deals with Qwest and Verizon, MSN is laying the groundwork for exiting the Internet access business, according to a new report.

Click here to read the article

 

 


Yahoo Platinum Launches with Live 'March Madness'
[March 17, 2003] Yahoo's $9.95/month video service launches with live feeds of 56 NCAA games and exclusive footage from reality TV programming. Is it enough to rival Real's SuperPass?

Click here to read the article

 


 

RIM 'Connects' with Microsoft, Symbian
[March 17, 2003] The 'BlackBerry Connect' licensing program opens up the wireless e-mail gateway to mobile device makers. Symbian and Microsoft are among the first to sign on.

Click here to read the article

 

 

Lucent and Sun Think More Mobile
[March 17, 2003] The alliance builds off of Sun's revamped Telecom Service Delivery Framework for a new round of delivery, messaging and networking services.

Click here to read the article

 

 

U.S. Hispanics Are Biggest Share of Spanish Speakers Online
[March 17, 2003] U.S. Hispanics continue to go online, and their numbers now surpass the online populations of Spanish-speaking countries like Spain and Mexico.

Click here to read the article

 

 

Buyers Would Pay More to Copy Digital Music
[March 14, 2003] As the copyright debate spins in boardrooms, hearing rooms and dorm rooms, a new survey suggests some common ground between content distributors and consumers.

Click here to read the article

 

 

 

Will Office 2003 Lead to Lock-in?
[March 13, 2003] UPDATE: One Open Source advocate suggests that the way Microsoft's Office 2003 productivity suite handles XML file formats may require users to standardize on an entirely Microsoft stack to see the benefits of the collaborative features the software boasts.

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/


Your response to the new Goodies Peer Reviews has been very heartening! We got a huge number of submissions. Remember, your submission remains in the pool of potential sites for two weeks. You will need to resubmit after two weeks to keep it in the pool.

Lots of people sent in invalid submissions. The most common error was to put the URL of your site in the body text of the email instead of in the subject. The next most common error was not having the email address of the sender on the site's home page. Remember, it can be in an "Author" Meta Tag (see see http://www.htmlgoodies.com/letters/210.html for more information about Meta Tags) on the home page, or it can be visible on the home page. We need this to verify that the person submitting the URL is actually the author of the site. We don't want to publish reviews of somebody's site without their knowledge and consent! If you fell into one of these traps, please resubmit your URL. The first three selections all failed this requirement. Zephyria Yachting was selected fourth.
 

 

 

 

Top
And Remember This . . .


On this day in...


 

Somewhere around 463 to 493 AD, Patrick dies and is buried in (probably) Down Cathedral, County Down, Ireland, later to be called Saint Patrick prior to the Catholic Church's official Canonization practice, and later to be given this day as his commemorative day.
Rather than try to give my own version of the history, I thought I'd refer you to these sites:
http://www.stpatricksday.ie/cms/stpatricksday.html
http://www.ccel.org/p/patrick/confession/confession.html
(The second one I found particularly interesting)

And In 1776, General George Washington succeeds in building a fortified position, and placing canons on Dorchester Heights looking down on the City of Boston from the south. Built quietly and covertly between March 4 and March 17 and completed under the cover of a storm, the fortification and its artillery was enough to force the British, some 11,000 troops and 1,000 loyalists, to evacuate Boston by ship. For his bloodless victory, General Washington was honored with the first ever medal awarded by the Continental Congress.
 

 


Thanks for reading Goodies to Go!

 

Archive Home Page.



Make a Comment

Loading Comments...

  • 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