Goodies to Go (tm)
August 25, 2003-- Newsletter #247�

By Vince Barnes



Goodies to Go (tm)
August 25, 2003--Newsletter #247

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


Featured this week:

* Goodies Thoughts - Static v Dynamic
* 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 - Static v Dynamic


"Oh no contest! Dynamic wins, hands down!" I hear from the peanut gallery. "Really?" I reply, "and it doesn't matter what we're talking about?"

The great thing about Goodies to Go readers is that they don't fall for trick questions like that! Of course, had the topic been web site content, then our peanut gallerian might have been on the right track. But if the topic was those pesky, ever changing IP numbers that our service providers assign to us, we could be singing a different song entirely. It's actually the problems of Dynamic IP address assignment that I'll be singing about today. Luckily for you, you're reading this and so can't hear me "sing" -- another huge benefit of the Internet!

Maybe you're building a new website and something isn't going quite right so you want your friend to take a look at it and see if they can help you out. Or, perhaps you've got a neat liitle game server going and you'd like your fellow gamers to be able to get into it. Then again, maybe you just want to be able to use some remote access mechanism to get to stuff in your own PC from the Internet. In each of these scenarios, and many more like them, the problem is that you have to know where your machine is. That is, you have to know its address. How can you know it's address when your service provider can change it on you at their whim? DDNS, that's how.

Dynamic Domain Name System/Service (DDNS) provides a means to translate a name into the address of your computer and to keep track of it as the address changes. The purpose of the Domain Name System is to resolve, or translate, a name like www.HTMLGoodies.com into an IP address. Names are much easier to remember than numbers and to most of us they are also more meaningful.

Usually, records are entered into a DNS server computer to indicate the address associated with a name within a domain. For example, when the domain name htmlgoodies.com was registered it was set to point to the Domain Name Server ns1.internet.com (as a primary DNS server.) A record in that server points the name "www" (a "hostname") to the IP address of the web server that houses our website. When you type www.htmlgoodies.com into your browser and hit "go" or "enter", your browser uses the DNS service to obtain the IP address of that server and sends it a request for our home page.

The DNS specifications now include the ability to dynamically add or change these records. All you need is a piece of software that can monitor your IP address and send it to a service that will accept the dynamic update. Where can you get these and how much will it cost you? I knew you'd ask! There a a few answers; here are a couple of the most popular.

Dynamic DNS Network Services, LLC, aka DynDNS.org, provides a free service as well as a premium service. The free service enable you to include up to five (currently) hostnames in one of their forty-three (currently) domain names. They provide links to client software (the part that will run on your computer) for you to obtain a free client for any of the common platforms/operating systems. Their premium service allows you to use your own domain name, and to record more host names. Their service works well even if your computer is behind a router. Some routers in fact also support DDNS themselves. Netgear, Linksys and several other vendors incorporate this support into some models of their routers. Check with the manufacturer's website before you buy if this is important to you.

Another company offering DDNS service is Tzolkin Corporation aka tzo.com Their services start at about US$24.95/year. Tzolkin doesn'd use BIND. BIND is the most common software used for DNS and Tzolkin argues that this makes it a frequent target of hackers. By not using BIND they keep themselves away from these attacks.

Both companies have redundancy/back-up servers in at least three different locations. One of Dyndns.org's servers is located in Europe. As of this writing, Tzolkin boasts five locations across the US. You will have to decide for yourself what you think is important.

Both companies also offer a solution for that other little annoyance coming from so many service providers. Namely, port 80 blocking. Requests for web pages come in on TCP/IP Port 80. By blocking inbound port 80 requests the ISP intends to prevent you from running a web server behind their connection. While this may work for the average citizen, it is only a minor impediment for a Goodies to Go reader. They simply log into their DDNS provider's site and set up Port Redirection (as Dyndns.org calls it) or HTTP Relay (as Tzolkin calls it). This way, unknown to the surfer visiting the site, the incoming Port 80 request is forwarded to a different port on your computer (a port which your service provider doesn't block) whose IP address is well known to the DDNS service.

If your computer is behind a router with a built in Firewall, or if you run Firewall software, don't forget to make sure that the inbound port you choose is open there too. And, of course, since your machine is to be providing services to the Web, make sure that you keep your security up to date (see last week's Goodies to Go at http://www.htmlgoodies.com/letters)

 

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. Is is possible to place a cell that provides scrolling capabilities into a specific location within a table? I have information that I wish to place in the cell, but do not want to enlarge the height of the page.

A. What you are looking for is an inline frame. The problem that you will to look out for is that inline frames are only recognized by Internet Explorer 4.0 and above and I think Netscape 6 and above. Here is a tutorial on inline frames:
http://www.htmlgoodies.com/tutors/inlineframes.html




Q. I am having trouble with using named parameters in JavaScript code. For example, in this simple mathematical code:
var number : integer = cos (30);
document.write (" the Cosine of 30 Degrees is " + number + " ")
This is where I'm trying to calculate the cosine of 30 degrees and have made a rule that the "number" variable must always be an integer. However, when I attempt to run this code, I get the error message in Netscape: [missing ";" before statement] in the line of code "var number : integer = cos(30)". I always get this type of message whenever I try to set any variable to always be an integer or string. What am I doing wrong?

A. Unlike other languages you cannot specify if a variable is a string or integer in JavaScript. Here is an example of how it would be done.
<hmtl>
<head>
<title>Test</title>
</head>
<body>
<script language="javascript">
var number = Math.cos(30);
document.write (" the Cosine of 30 Degrees is " + number + " ");
</script></body></html>
And here is link to a tutorial on the Math object:
http://www.javascriptkit.com/javatutors/math.shtml




Q. This code is supposed to display the date like this, Friday 1st August 2003, but instead of showing 1st, 2nd and 3rd, it displays 1th, 2th, 3th. I've tried everything I can think of to fix the problem. What do you think?
<SCRIPT>
newdate = new Date()
var wday = newdate.getDay()
var day = newdate.getDate()
var month = newdate.getMonth()
var year = newdate.getYear()
if (day == 1)
{ var dayex = "st" }
if (day == 2)
{ var dayex = "nd" }
if (day == 3)
{ var dayex = "rd" }
else
{ var dayex = "th" }
// End of day extension
if (month == 0)
{ var month = "January" }
if (month == 1)
{ var month = "Febuary" }
// above code repeats for month indexes 2-11
// End of months
if (wday == 0)
{ var wdayex = "Sunday" }
if (wday == 1)
{ var wdayex = "Monday" }
// above code repeats for day of week indexes 2-6
// End of week day
document.write(wdayex + " " + day + dayex + " " + month + " " + year)
</SCRIPT>

A. I would recommend that you leave it off. You would have to either use either a series of if statements to check each day of the month or do some string manipulation to check the last digit of the day variable to determine which extension to use. As your code is currently written you will always default to "th" if the day variable is anything other than "3". That is because this if statement:
if (day == 3)
{ var dayex = "rd" }
else
{ var dayex = "th" }
says that if the day is not 3 then it sets the dayex variable to "th", overriding your previous if statements.
[You could also initialize it to "th" then change it to "st", "nd" or "rd" for values of 1, 21, 31, 2, 22, 3 or 23 - Ed.]




Q. I have a question about backgrounds and style sheets. Is there any way (such as using the "repeat-y" function) to get the background to border down the right as opposed to the left side? Also, is there a way to get it to tile down both sides? I am essentially interested in getting the look of a border on both the left and right side of the page, but i want it to appear correctly on all screen resolutions, so of course, making a very long image with the desired left and right backgrounds simply on opposite sides or the image would be impractical.

A. I have one way for this to work; however, it doesn't work in IE 5.5 (I don't currently have access to IE 6 at the moment, but can check later). It does work in NN 6 and above, Mozilla, and Opera.
Add two divs to the bottom of your HTML file:
<div id="left"></div>
<div id="right"></div>
Then add the following CSS:
#left {
position: fixed;
top: 0;
left: 0;
width: 100px;
height: 100%;
border: 1px solid red;
margin: 0;
padding: 0;
background: url(ava.gif) repeat-y top left fixed; }
#right {
position: fixed;
top: 0;
right: 0;
width: 100px;
height: 100%;
border: 1px solid red;
margin: 0;
padding: 0;
background: url(ava.gif) repeat-y top right fixed; }
This will set backgrounds for the two extra divs in your HTML, and should tile the length of the page. IE 5.5 doesn't recognize the "fixed" property for anything other than background images for the BODY tag, so the extra divs scroll with the page.

 

 

 

 

Top

News Goodies


Security Specialists Respond in Force
[August 25, 2003] Security software companies Symantec and Network Associates position themselves as the defender against worms and viruses.

Click here to read the article


 

'Critical' Security Hole in Real's Helix Server
[August 25, 2003] Workarounds are recommended for the root exploit vulnerability which carries a 'highly critical' rating.

Click here to read the article

 

 

DMA Plans Spam Sting
[August 25, 2003] The direct marketing group plans to link up with the FBI to hunt down spammers breaking the law.

Click here to read the article

 

 


Macromedia Retools MX Line
[August 25, 2003] The Web design software and developer tool maker announces new MX 2004 applications, touts new look and feel and tighter integration.

Click here to read the article

 


 

Switchboard Rolls Out Paid Link Program
[August 25, 2003] Advertisers can buy links on their local listings or on another non-commercial listing.

Click here to read the article

 

 

Level 3, SBC Extend Dial-Up Deal
[August 25, 2003] The backbone network operator Level 3 will carry Internet traffic from the service provider through 2006.

Click here to read the article

 

 

Sobig.F Weekend Attack Thwarted; Feds Hunt Source
[August 25, 2003] Despite claiming a minor victory over a second wave of the fast-spreading worm, experts warn that open ports on infected machines continue to pose a major threat.

Click here to read the article

 

 

Ask Jeeves Adds Search Tools
[August 25, 2003] Smart Answers give searchers weather forecasts, airline flight delays and metric conversions.

Click here to read the article



 

Utility Computing Shines in Blackout
[August 22, 2003] Experts say the ability to provision computing resources from remote locations keeps businesses running during a blackout, even when their own data centers are without power.

Click here to read the article

 

 


Intel Chips Start Flying Off the Shelves
[August 22, 2003] Great demand for the company's microprocessors, chipsets and motherboards seem to support analysts' predictions of a PC revival in the next 12 months.

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/



Gilbert Leighton wanted to point out that I didn't mention firewalls in my piece about worms last week. That's true, Gilbert, and thank you. I agree that firewalls a good form of protection. Whether they are in the form of a device that sits between your computer and the device that connect you to the Internet (e.g. your cable or DSL adapter) or the software kind that runs in your computer, like the one that's built in to Windows XP, all firewalls are a very helpful weapon in the battle to defend our PCs. Make no mistake though Gilbert! They are NOT foolproof! You still need to take care of other forms of defense. I have said it before and will often repeat it; computer system security is a journey, not a destination. Your very best defense starts with concerted vigilance.

Thanks again for all your feedback!

 


Windows Tech Goodie of the Week:


ASP.NET Calendar Sample

One of the more tedious things to design and build in classic ASP is now so easy it's scary. Here's a quick introduction to using the ASP.NET calendar control.

http://www.asp101.com/samples/calendar_aspx.asp

** and **

Creating a Generic Pager Control

ASP.NET provides only one control that supports paging, the DataGrid. Tomasz Kaszuba shows how to build and implement a custom pager for different controls that change depending on the data source or presentation.

 

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

 

Top
And Remember This . . .


On this day in...

1944 Paris Liberated


The French 2nd Armored Division and the U.S. 4th Infantry Division swept the Nazis out of Paris on this morning in 1944. The Nazis had taken Paris on June 14, 1940. The French 2nd Armored Division, which had been formed in London the year before especially for the purpose of liberating Paris, was under the command of General Jacques-Philippe Leclerc and was attached to General George S. Patton's 3rd U.S. Army. On the 23rd, the 2nd Armored Division advanced on Paris from the north and the 4th Infantry Division from the south. By midnight the 2nd Armored was at the Httel de Ville in the heart of Paris. In the morning, the 2nd Armored cleared the western half of the city and the 4th Infantry cleared the east. German General Dietrich von Choltitz was arrested by the French in his headquarters. Although he had set explosives all over the city, in the end he deliberately disobeyed Hitler's direct order to leave Paris as a "field of ruins". He did not want to be remembered as the man who destroyed Europe's "City of Light".
 


Today was also the day that: in 1718 French colonists arrive in Louisiana to found New Orleans; 1814 the British capture Washington DC; 1830 Belgiun revolts against the Nertherlands; 1875 Matthew Webb is the first to swim the English Channel; 1900 philosopher Freidrich Nietzsche died in Weimar, Germany; 1921 US signed peace treaty with Germany; 1981 M- C- sentenced to 20 years for murder of John Lennon; 1990 UN Security Council authorizes military action against Iraq

Born today were: in 1530 Ivan Vasiljevich (Ivan IV, Ivan the Terrible, Grand Prince "all over the Rus"); 1819 detective agency founder Allan Pinkerton; 1918 conuctor/composer Leonard Bernstein; 1918 actor Richard Greene (Robin Hood); 1919 Ala. Gov. George Wallace; 1923 game show host Monty Hall; 1930 actor Sean Connery; 1931 TV personality Regis Philbin; 1933 actor Tom Skerritt; 1947 actress Anne Archer; 1954 rock musician Elvis Costello; 1970 super-model Claudia Schiffer

 

 

 


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