Goodies to Go! Newsletter #311

By Vince Barnes



Goodies to Go (tm)
November 15, 2004 -- Newsletter # 311

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


Featured this week:

* Goodies Thoughts - The Best Language, Revisited
* Q & A Goodies
* News Goodies
* 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 - The Best Language, Revisited


A couple of weeks ago, the Goodies Thoughts piece concerned itself with the question of "The Best Language" for computers (see the archive at http://www.htmlgoodies.com/letters/309.html) That piece was written to highlight some of the common misunderstandings of those who are not initiated into the wonderful worlds of computers, programming and web creation.

As it turns out, I have received quite a few emails from those of you who, it seems, would like my real opinion as to the answers to the more specific questions implied in the piece; so here goes! (By the way, I'm going to assume that you have already read that piece, so if you haven't yet, you might want to check it out.)

Let's begin with the most obvious, which is , of course, web creation. The language to start with here is, without a doubt, HTML. (For the sake of this week's discussion, I choose to ignore the pedantic issues concerning "language" versus "markup" and treat all as languages.) HTML is THE language of the Web. There are, of course, various versions to concern yourself with. The current version is 4.01, but earlier versions are still fully supported. It doesn't really matter which version you study first, but it will help you out in the long run to become familiar with the nuances of the latest version. To learn HTML, begin with our HTML tutorials at http://www.htmlgoodies.com/primers/basics.html and finish up with the 4.01 variations at http://www.htmlgoodies.com/tutors/html4dir.html

Then there's XHTML. This is the "next generation" of web programming languages. Happily, there's not a whole lot of new stuff to learn, if you're already familiar with HTML. To find out the differences, check out http://www.htmlgoodies.com/tutors/xhtml.html http://www.htmlgoodies.com/xhtml/intro.html and http://www.htmlgoodies.com/xhtml/syntax.html

No study of the art of Web design would be complete, however, without the additions of both client side and a server side scripting language. The choice of client side language is quite clear. The most universally available language is JavaScript. To study it, go to http://www.htmlgoodies.com/beyond/js.html for everything you need. On the server side there is room for discussion. For the Windows only platform, there's ASP and ASP.Net (see http://www.htmlgoodies.com/beyond/aspdir.html) but for more universality there are languages like PERL and PHP. My personal choice out of these two is PHP. You can study it with our new tutorial series at http://www.htmlgoodies.com/php/index.html

Next, there's computer programming. There is a plethora of languages available for this purpose. Many of them are specific to a purpose, such as scientific, mathematical, business or gaming. Common to almost all, however, is the set of fundamental principles of computer programming. This being so, it almost doesn't matter which one you learn first. Having got one language firmly under your belt, it's mostly a matter of syntax and grammar to learn a new one (mostly!)

If you want to get into computer programming, beginning at the beginning, as it were, my recommendation is to learn a language that holds to today's principles of programming, such as Object Oriented Programming, but is relatively simple to read and understand. A language which closely fits this criterion is Visual Basic. There may well be languages which are better able to provide for the needs of specific programming requirements (in fact, that's almost certain!) But there is probably not a language better suited to the purpose of learning the principles of computer programming. (And, OMG, don't I know that I'll get into trouble with one or another set of purists for that statement!! -- In advance, I apologize!)

Get deeper into computers; to the operating system level, for example; and you arrive at the assembler level languages. The difference here is that these languages are specific to a processor's instruction set - that is, they translate, one to one, to "instructions" that are "wired into" or "built into" the processor's physical circuitry. Programming at this level is highly specific, complex and specialized. If you have a need for this type of language, then you probably already know which language you need.

Funnily enough, the assembler level languages are know as low level languages, where languages like Visual Basic are known as high level languages. It might seem that higher levels would be more complex. In fact, the opposite is true; the lower the level of the language is, the closer to the heart of the system you are getting and the more complex your programming task is becoming!

Whatever type or level of language you choose, it is my fervent hope that you enjoy it and do well. I truly believe that the future of mankind will be shaped by those of us that learn the use complex computer systems, such as the Internet, to communicate information between each other and, especially, from generation to generation.



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>

 

 

 

 

 

 

Top

News Goodies


Sun Unveils Application Switch for Servers
[November 15, 2004] The vendor released the technology it has been baking since it acquired Nauticus earlier this year.

Click here to read the article

 

 

 

Sun Sets Solaris 10 Free
[November 15, 2004] A new pricing structure targets Red Hat customers.

Click here to read the article



 

Dell, Microsoft Team For 'One-Click' Management
[November 15, 2004] The long-time partners make good on last year's pledge to integrate management software, automating data centers.

Click here to read the article

 

 

 

Yahoo for DomainKeys
[November 15, 2004] E-mail authentication is just one enhancement the portal announced today.

Click here to read the article

 

 

 

Dell Looking For Bigger Blade Share
[November 15, 2004] The systems vendor hopes to lure new customers by charging less for its new blade servers than its 1U rack systems

Click here to read the article
 

 

 

Adobe's Acrobat Flips For Collaboration
[November 15, 2004] Adobe's Version 7.0 lets plain old Adobe Reader users review documents.

Click here to read the article

 

 

 

One Access Point For All Wi-Fi
[November 15, 2004] Wireless and peripheral specialist Symbol intros a new access point to make better use of WLANs.

Click here to read the article

 

 


Take Your Linux PC Anywhere
[November 15, 2004] Symantec finally acknowledges Linux' presence, goes mobile and revamps its encryption scheme.

Click here to read the article

 

 

 

Deadline Extended in California MS Settlement
[November 13, 2004] Clock is ticking on the $1.1 billion antitrust settlement the state struck with Microsoft.

Click here to read the article


 

 

Conservatives Aim to Sink Pirate Act
[November 12, 2004] American Conservative Union says Hollywood wants to use DOJ as its private law firm to sue infringers.

Click here to read the article

 

 

 

 


Top

Goodies Peer Reviews


 

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




Thanks again for all your feedback!
 

 

Top


 


Windows Tech Goodie of the Week:
 



Business Intelligence with Microsoft SQL Server Reporting Services - Part 3

Adnan Masood concludes his discussion of Microsoft SQL Server Analysis services and Microsoft SQL Server Reporting services. In the final part, he discusses Reporting Server web services and using custom code in reports.

http://www.15seconds.com/issue/041110.htm


*** AND ***


Introduction to Inheritance in ASP.NET


How many times have you been working with an object or ASP.NET control and wanted it to behave a little differently or do something that it couldn't?
What if you could make a new version that automatically got all the features of the old version and only changed or added what you wanted? You can... and it's all thanks to the fact that .NET is object oriented.

http://www.asp101.com/lessons/inheritance.asp


*** AND ***


Working with the WebSurvey Control's Results


In this article, I want to introduce another control, SurveyResult, which is designed to work hand-in-hand with WebSurvey. As it's name implies, SurveyResult displays the results of a WebSurvey survey. In my previous article we looked at how to use the WebSurvey control; by the end of this article you'll see how to easily display the results of a completed survey.

http://aspnet.4guysfromrolla.com/articles/111004-1.aspx

 

 


 

Top


 

 

 

 
And Remember This . . .


On this day in...
 

1984 Baby "Fae" died

At the Loma Linda University Medical Center in Loma Linda, California, doctors attempted a radical procedure to save the life of an infant, dubbed "Baby Fae" to protect her family's privacy. Baby Fae had been born with a heart abnormality which almost always resulted in death. Heart surgeon Dr. Leonard L. Bailey persuaded her parents to allow him to try an experimental Baboon heart transplant procedure. Previously, three other patients had received animal heart transplants, but none had survived more than eighty-four hours. Dr. Bailey felt that an infant like Fae would have a better chance since their immune system was less developed and would not be able to reject the heart so easily. The operation was performed on October 26, 1984, when the infant was fourteen days old. Initially, prospects were positive. After a couple of weeks, however, her body's rejection of the alien organ began to build. The required increase in immunosuppressive drugs caused a kidney failure, and eventually led to a heart failure which, on this day in 1984, proved fatal. She lived for twenty days.


Today was also the day that in: 1763 Charles Mason and Jeremiah Dixon began surveying the line between Pennsylvania and Maryland (the Mason-Dixon line); 1777 the Articles of Confederation were adopted by the Continental Congress; 1806 explorer Zebulon Pike sighted Pike's Peak; 1932 the Walt Disney Art School was created; 1939 the US Social Security Administration approved its first welfare check; 1957 Soviet spy Rudolf Ivanovich was sentenced to 30 years and $3,000 fine in the US; 1969 250,000 protesters held a peaceful demonstration against the Vietnam War in Washington DC; 1969 Janis Joplin was accused of "vulgar and indecent language" in Tampa, Florida, US; 1982 Funeral Services were held in Moscow's Red Square for Leonid Breshnev; 1983 Turkey proclaimed the "Turkish Republic of Northern Cyprus"; 1988 the Palestine Liberation Organization (PLO) proclaimed the State of Palestine, recognizing also the existence of the State of Israel;


Born today were: in 1708 the "Great Commoner" and twice UK Prime Minister, William Pitt the Elder; 1738 discoverer of Uranus, astronomer Sir William Herschel; 1815 painter of the world's largest painting, the "three mile canvas", John Banvard; 1882 Austrian, and US Supreme Court Justice, Felix Frankfurter; 1891 WWII German African Campaign Field Marshall Erwin Rommel; 1905 Italian orchestra leader Mantovani; 1919 Louisianas "People's Court" Jude Joseph Albert Wapner; 1923 English actor Peter Hammond; 1929 actor Edward Asner; 1931 actor John Kerr; 1932 English singer Petula Clark; 1933 comedian Jack Nurns; 1934 actress Joanna Barnes; 1937 actor Yaphet Kotto; 1939 actor Thalmus Rasulala; 1945 Swedish musician Anni-Frid Lyngstdad (ABBA); 1954 actress Beverly D'Angelo; 1977 9th in succession to the throne of the United Kingdom Peter Mark Andrew Phillips;
 

 


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