Goodies to Go (tm)
July 14, 2003-- Newsletter #241

By Vince Barnes



Goodies to Go (tm)
July 14, 2003--Newsletter #241

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


Featured this week:

* Goodies Thoughts - A Thousand Words' Worth
* 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 - A Thousand Words' Worth


You can talk all you want, but some of your audience will still miss the point. Imagine a company trying to sell their product and producing a website. The company is Americas Finest Diamonds and the site discusses the attributes of their product. It talks about the richness of the color, the durability and smoothness of the surface, describing them as the kind of diamond everyone would love and everyone would be proud of. Now imagine how much clearer the impression would have been if they had included a photo of, say, Yankee Stadium to illustrate the kind of diamond they deal with. Ah, yes indeed, a picture is worth a thousand words!

Using photos on a website not only increases the immediate understanding your audience gets and enhances the appeal of your product, but their judicious use can make the visitor's visit more enjoyable, more fun or more comfortable. Of course, excessive use makes it slower and therefore more annoying, so you'll need to watch that balance. You can also alleviate the situation a little by making sure the pictures are not too large. Check out this archived issue of Goodies To Go for some more info on that point: http://www.htmlgoodies.com/letters/201.html

While were on the subject of useful tools for adjusting your photos, you might want to take a look at this article also: http://www.htmlgoodies.com/toolbox/aftershot.html

Selecting the right photo is also important. My favorite tip for selecting pictures is also the same for taking pictures. Have you ever taken a family portrait and looked at the picture later only to find that the family members' images are so small that you can hardly recognize them in front of the massive building in the background? Imagine taking a picture of a duck only to look at it later and realize that you have a photo of an expanse of water with a dark indiscernible object near its center. The trick is to look at everything around what you're photographing and decide whether or not it belongs in the picture, and only look at what you want to photograph after you have removed the clutter from the frame. When selecting a picture, apply the same method. Make sure it is a picture of what you want to show; not a picture of a panoramic background with a minute example of your object somewhere near the middle. Of course you can also crop the picture to eliminate the background. Just make sure that the resulting image retains enough picture quality to still be a good example.

Another thing to watch out for is the legal question. If you took the photo yourself, you have the right to use it how you wish (unless, of course, you've sold that right!) If, however, you found the picture somewhere, it is very important that you ensure you have the right to use it and are not violating a copyright. The penalties for copyright infringement can be severe. It is much cheaper to buy the right to use a photo. Graphic artists do this all the time, getting their pictures from a stock photo library or agency. If you want to save a bundle on the fees, however, you can subscribe to photos.com. They charge from $99 for one month, to $499 for a year and you can get unlimited royalty free pictures in a variety of formats (from web-ready to print-ready) from a categorized collection of more than 50,000 photos. If you've checked out fees before you'll know that this is a bargain. If you don't want to, or can't justify, paying a fee for the picture, then please, take your own picture -- don't get caught with a copyright violation!

A friend of mine a while ago had just moved into a new apartment and was showing me a photo of its interior. "I'm glad to see you feel really comfortable in your new place," I told him, "check out the mirror!" Next time, I believe he will get dressed before pulling out his camera; and maybe he'll remember to look at all the details before showing off his pictures!

 

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 modify all the <div> elements in a document. I will not know before calling the JavaScript method how many <div> elements are in any document so I need a way to get the number of <div> elements in a document. Looking at a copy I have of the Document Object Model I can see there is a way of getting an array of <a> elements. Is there a way of getting an array of <div> elements?

A. I found this script at another board. It may help you:
<html> <head>
<title>Finding Child Nodes</title>
<script language="JavaScript">
function find_child()
{
var divs = document.getElementsByTagName('div');
var message = 'There are ' + divs.length + '<div>\'s in this page with
the following ids:\n';
for (var i = 0; i < divs.length; i++)
{message += divs.item(i).getAttribute('id') + '\n';}
alert(message);
}
</script>
</head>
<body>
<div id="mydiva">This is div a</div>
<div id="mydivb">This is div b</div>
<a href="javascript:find_child()">Click Me</a>
</body>
</html>




Q. I'm looking for a redirect script that works by months. I've seen scripts that redirect based on the day of the week but not this. I have a simple event calendar, one page per month, and I'd like the current month's calendar to open when someone clicks the "Calendar" link in the main navigation menu on any page.

A.
Here is an example of one way you could accomplish this:
<html> <head>
<title>Calendar of Events</title>
<script language="JavaScript">
myevents=new Array()
myevents[1]="january.html"
myevents[2]="february.html"
myevents[3]="march.html"
myevents[4]="april.html"
myevents[5]="may.html"
myevents[6]="june.html"
myevents[7]="july.html"
myevents[8]="august.html"
myevents[9]="september.html"
myevents[10]="october.html"
myevents[11]="november.html"
myevents[12]="december.html"
function getCal()
{
mydate=new Date
mymonth=mydate.getMonth()+1
location.href=myevents[mymonth]
}

</script>
</head>
<body>
<a href="javascript:getCal()">Calendar</a>
</body>
</html>




Q. I have a pop up window that automaticlly loads behind the index page. How do I stop it from reloading each time a vistor goes back to the home page? Here is the code I have:
<script language="JavaScript">
function MyExit() {
var windowHandler = null;
windowHandler =
window.open ('newsletter.html','Openme','width=375,height=365,scrollbars=auto,resizable=no');
}
</script>
<script>
//Popup Window Script
function openpopup(){
var popurl="newsletter.html"
winpops=window.open(popurl,"","width=500,height=400,scrollbars=yes")
window.focus();
}
openpopup()
</script>

A. Here is a link to a script that uses a cookie to keep it from poping up every time in the same browser session.
http://www.javascriptkit.com/script/script2/popunder.shtml
[& here's a link to help you block those annoying pop-up and pop-under messages <g>:
http://www.panicware.com - ed.]




Q. There is a HALO fan site on the web and they have some sort of title generator that changes the title every time you load the site. How'd he do that?

A. It looks like they are using a Server Side language such as Perl or PHP to do that, but you can use JavaScript. Here is an example:
<html> <head>
<title>Title change</title>
<script language="JavaScript">

mytitle=new Array()
mytitle[0]="New Title One"
mytitle[1]="New Title Two"
mytitle[2]="New Title Three"
mytitle[3]="New Title Four"
len=mytitle.length
randnm=Math.round(Math.random()*(len-1))
document.title=mytitle[randnm]
</script>
</head>
<body>
This is a test
</body>
</html>




Q. I know you can use onMouseOff and onMouseOver to control an image flip, but I wonder if you could do the same with opening a new window by having onMouseOver open a new window, and onMouseOff close that window. I've searched on the page, and can't find anywhere that shows how to close a window other than the current one.

A. Here is an example of one way you could do it:
<html>
<head>
<title>Open Window</title>
<script language="JavaScript">
function OpenWin(theurl,w,h)
{
features="width="+w+",height="+h+",top=100,left=300"
NewWin=window.open(theurl,"win1",config=features)
}
</script>
</head>
<body>
<a href="#" onMouseOver="OpenWin('page2.html','200','200')"
onMouseOut="NewWin.close()">Mouse Over Me</a>
</body>
</html>
 

[Note that's "onMouseOut", not "onMouseOff" -- Ed.]


 

 

 

 

Top

News Goodies


Yahoo! to Buy Overture
[July 14, 2003] UPDATE: The deal marks Yahoo!'s boldest move in search, scooping up paid search pioneer Overture for $1.6 billion. 

Click here to read the article



 

DOJ Clears Path for PeopleSoft to Buy J.D. Edwards
[July 14, 2003] The U.S. Department of Justice clears the way for PeopleSoft to purchase J.D. Edwards, which could put a crimp in Oracle's hostile bid to acquire PeopleSoft.

Click here to read the article

 



Computer Associates Kicks Off CA World
[July 14, 2003] UPDATE: The software company unfurls the latest banner in its on-demand computing strategy, an asset mapping technology it calls Sonar at its CA World event in Las Vegas; CA Chairman and CEO Sanjay Kumar keynotes.

Click here to read the article

 

 

 

DoubleClick Takes Wraps Off Rich Media Product
[July 14, 2003] DART Motif, designed in collaboration with Macromedia, aims to strip the complexity and high costs from deploying rich media.

Click here to read the article

 

 

Vindigo Takes City, Movie Guides to ALLTEL
[July 14, 2003] The mobile application developer adds ALLTEL to the growing list of carriers offering its applications to customers.

Click here to read the article

 

 


Sybase Strengthens Linux Ties
[July 14, 2003] The integration company opens a Linux Competency Center and takes on the mantle of Red Hat Premier ISV Partner.

Click here to read the article

 


 

AT&T Expands News Corp. Deal
[July 14, 2003] When Rupert Murdoch needs to contact underlings in his media empire, AT&T will make it happen thanks to a new $150 million pact.

Click here to read the article

 

 

Unisys Jumpstarts Server Line with JVM
[July 14, 2003] The company claims to be the first to offer JVM for high-performance, Windows-based server-side computing.

Click here to read the article

 

 

Jupitermedia Snaps Up DevX.com
[July 14, 2003] Looking to extend its developer resources, Jupitermedia acquires the DevX.com Network.

Click here to read the article

 

 

Virus Alert: Worm Uses Own SMTP Engine to Spread
[July 10, 2003] A worm that spreads using its own SMTP engine creates copies of itself in the Windows system folder.

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/



I mentioned this last week and this week am putting out a "final call". Many thanks to all those who sent in to volunteer their services. We'll be in touch with every one of you in the next week or so. Here it is again: The Mentor Community is being revised. If you are interested in becoming a Mentor and answering the kind of question you see published in the Q&A section, please sent an email to nlfeedback@htmlgoodies.com with "Mentor Volunteer" as the subject.

Thanks again for all your feedback!

 

 

 

Top
And Remember This . . .


On this day in...


1789
The Storming of the Bastille
Starting the French Revolution that led to the end of the French monarchy and the formation of a constitutional government in France, hundreds of Parisians began the assault, or storming, of the Bastille. The Bastille had been built originally as a fortification, but in the seventeenth century it was converted into a state prison, and used to hold dissidents and other political prisoners. It became a symbol of the oppressive rule of the monarchy. In the eighteenth century resentment against King Louis XVI led to riots in the streets and on this day the storming of the Bastille. When deserting French amry soldiers joined in, bring five canons and aiming them at the Bastille, Bernard-Jordan de Launay, governor of the Bastille, surrendered. The monarchy was abolished in 1792, and Louis XVI and his wife, Marie-Antoinette, were put to death by guillotine for treason. July 14, Bastille Day, is a national holiday in France.

Born today were: in 1903, novelist Irving Stone; 1910 Cartoonist William Hanna (Hanna-Barbera); 1911 actor Terry Thomas (Thomas Stevens); 1912 folk singer-songwriter Woodie Guthrie (Dad to Arlo); 1913, former US President Gerald Ford; 1918 film director Ingmar Bergman;

 

 

 


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