SHARE
Facebook X Pinterest WhatsApp

Goodies To Go! Newsletter #350

Written By
thumbnail
Vince Barnes
Vince Barnes
Aug 18, 2005

************************************************************
Goodies to Go ™
August 16, 2005 — Newsletter # 350
  This newsletter is part of the internet.com
network.
http://www.internet.com
 
************************************************************


Featured this week:   *   Goodies Thoughts – Here and There

*   Q & A Goodies
*   News Goodies
*   Feedback Goodies
*   Windows Tech Goodie of the Week 
*   And Remember This…
 

************************************************************

  Here and There
 

When it comes to the task of problem resolution, we will so often find that


it breaks into ninety percent identification and ten percent solution.

 

In


other words, once the problem has been properly diagnosed, its resolution is


often a relatively simple matter.

 

This is certainly true when it comes to


the art of web page design.

 

Here at HTML Goodies, we get tons of questions coming in all the time.

 

Sometimes these questions are about fairly difficult coding techniques,


sometimes they

re about where to find something on the Goodies site, but


many times they are about attempts to solve problems that the questioner


doesn

t have

let me explain.

 

When it comes to diagnosing problems on web pages, the first thing to think


about is where the problem is happening.

 

Is it here, or there?

 

In other


words, is the problem originating in the server, or is it because of


something in the client?

 

The red

"

X

"

s I spoke about a couple of weeks ago are an example of a problem


originating in the server.

 

The picture file is not in the right place, or


the code in the page doesn

t correctly reference the place where it is.

 

That all has to do with the server.

 

A Java applet not running could easily be the result of a client problem.

 

If it runs OK when you look at it but it won

t run on your friends


computer, does your friend have Java installed?

 

A lack of it would


certainly be a client problem, and nothing you could do to your page could


fix it (unless you took out your applet altogether, but that

s not really a


"

fix

"

, is it?)

 

Web pages originate in the server, but are sent down to the client to be


viewed.

 

When they get there, there are a lot of things that are beyond the


control of the web page designer, such as the browser in use and all its


optional settings.

 

Of course, a good web page designer will make every


effort to ensure that the page will look right in all the most popular


browsers, with the standard settings, but there are things that they can do


nothing about.

 

Taking time to make sure all things are nicely proportioned is great, but


the client can choose to have massive fonts, or tiny ones.

 

They can also


choose to change their default colors.

 

Telling them to use

"

view source

"


for some reason is all well and good, except they can choose which program


(if any) will be used for that view.

 

"

Scrabble

"

, while not a good choice,


is a possible choice.

 

They also have control over their ability to print things from your page.

 

If I want a client to print something, my preference is to offer a PDF, if


that

s at all possible.

 

Their print of a form could take on all sorts of


strange appearances, even though it prints perfectly on your PC.

 

If a site visitor tells you something about your site is not working


properly, think first

"

is it here or there?

"

If it

s there, perhaps the SEP


principle applies (Somebody Else

s Problem

thanks, Douglas Adams!)

         

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 downloaded the following script and I am somewhat at my wit

s end in


trying to figure out how to modify it to suit my needs:


 

<

script language=

"

JavaScript

"

>

<

!


 

function addDays(myDate,days) {


    

return new Date(myDate.getTime() + days*24*60*60*1000);


 

}


 

document.write(addDays(new Date(),10));


 

//

>

<

/script

>


The script outputs the date and time x-number of days in advance of the


current date and time.

 

I would like to alter it so that it only outputs the


date and not the time.

 

Sounds simple enough, doesn

t it?

 

I

ve been trying


to figure this thing out for about three hours on my own.

  A.

Here is a slight modification of the script that will write out the date


only in mm/dd/yyyy format.


<

html

>


 

<

head

>


 

<

title

>

Date and Time Print

<

/title

>


 

<

/head

>


 

<

body

>


 

<

script language=

"

JavaScript

"

>

<

!


 

function addDays(myDate,days) {


    

return new Date(myDate.getTime() + days*24*60*60*1000);


 

}


 

new_date=addDays(new Date(),10)


 

year=new_date.getFullYear()


 

month=new_date.getMonth()


 

day=new_date.getDate()

   

document.write(month+

"

/

"

+day+

"

/

"

+year);


 

//

>

<

/script

>


 

<

/body

>


<

/html

>

       
    
Q.

How is SHTML related to HTML?

  A.

The .shtml extension means that server side includes (SSI) code is being


used with the html code. Here is a link describing it:



http://htmlgoodies.earthweb.com/beyond/ssi.html
     

    
Q. 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.

     

    
Q. I’ve just started experimenting with frames for a redesign to my website
(hand coded and I’m self taught with HTML!)  I want to use an image behind
links for the side frame on my page.  I just don’t know how to code a
background image so that it will remain "fixed" (I think that’s the right
word) instead of tiling itself across the page. 

  A.

I think you

re looking for this CSS property:


background { url(image.gif) no-repeat; }


You could also add

"

fixed

"

as another property, which will hold the


background in place (no scrolling). The

"

no-repeat

"

will add the image just


one time.

     
    Q. 

I made a small

"

form

"

type page with 3 boxes in which to type data.

 

I


am trying to figure out how to make that page open with the cursor already


located in box #1, instead of having to hit Tab 2 or 3 times.

 

The form is


written in HTML, but I

m assuming that I will need to use Javascript to


accomplish this.

  A.

You could use the onLoad event in the body tag to place focus on the


first


box this way:


<

body onLoad=

"

document.form_name.field_name.focus()

"

>


"

form_name

"

would be the name you gave your form in the form tag and


"

field_name

"

would be the name you gave the first box in your

"

<

,input

>

"


tag.


If your form and field do not have a name associated with them then you can


use this format: document.forms

[

0

]

.elements

[

0

]

.focus()


The above refers to the first form and the first element in that form.

              News Goodies

***********************************

  Small Devices, Big Risks

[

August 16, 2005

]

Businesses are overlooking security risks posed by their


workers

USB memory sticks, iPods and PDAs, a software maker says.


Read the article:



http://www.internetnews.com/security/article.php/3527661
 
Comcast Gives Customers Security Software

[

August 16, 2005

]

The broadband provider will give subscribers three


applications from security specialist McAfee.


Read the article:



http://www.internetnews.com/xSP/article.php/3527776
 
Site Settles Deceptive Credit Report Claims

[

August 16, 2005

]

FTC imposes a $950,000 fine and requires consumer


restitution.

 

Read the article:



http://www.internetnews.com/ec-news/article.php/3527756
 
VeriSign Goes to School

[

August 16, 2005

]

Amid a string of college security breaches, the company


teams with a nonprofit to offer digital certificate services to schools.


Read the article:



http://www.internetnews.com/security/article.php/3527646
 
Symantec Hardwires Partners

[

August 16, 2005

]

The company adds functionality from other developers to


expand the reach of its commercial-grade security appliances.


Read the article:



http://www.internetnews.com/ent-news/article.php/3527746
 
JBoss Tweaks Migration Program

[

August 16, 2005

]

Open source vendor standardizes migration path away from


competing, commercial app server vendors.


Read the article:



http://www.internetnews.com/dev-news/article.php/3527651
 

Microsoft’s Acrylic Moves Closer to Vista

[

August 15, 2005

]

Latest beta release of design tool aims at application


UIs.


Read the article:



http://www.internetnews.com/dev-news/article.php/3527611
 
IBM Donates Code to Firefox

[

August 15, 2005

]

Big Blue gives the Mozilla Foundation accessibility code


to improve feature-rich pages.


Read the article:



http://www.internetnews.com/xSP/article.php/3527341
 
Game Over: Next Year’s H1-B Visas Already Gone

[

August 15, 2005

]

Early run on visa pool prompts tech calls for increased


allocations.

 

Read the article:



http://www.internetnews.com/bus-news/article.php/3527631
 
AOL Unveils Mobile Storefront

[

August 15, 2005

]

The suite of services brings AOL to the palm of your


hand.

 

Read the article:



http://www.internetnews.com/wireless/article.php/3527476
     
 
 
 
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:

 

nlfeedback@htmlgoodies.com

 

We already receive a lot of email every day.

 

This address helps 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/
     

Thanks for all your feedback!

         
Windows Tech Goodie of the Week 

***********************************

  Streamlining Your Data Access Layer with Helper Methods  

This article focuses on how to streamline the data access layer through


encapsulating common functionality with the aid of simple helper methods.



The helper methods we

ll examine in this article are ones that I have


created and used in many of my consulting projects over the past several


years, and have helped me to greatly trim down my data access layers. Read


on to learn more!

 
http://aspnet.4guysfromrolla.com/articles/081005-1.aspx
 
*** AND ***  
Database Multi-Sort Classic ASP Sample
 

This works just like our Database Sort sample except that it adds the


ability to sort by multiple fields just by clicking on the field headings.



The script will sort on as many fields as you want but it does remove


duplicates to keep things logical.

 
http://www.asp101.com/samples/db_sort_multi.asp
 
*** AND ***  
SQL Server 2005 XQuery and XML-DML – Part 2
 

In the second part of his series on SQL Server 2005

s new XML support, Alex


Homer looks at extracting data from XML columns, comparing traditional XML


data access approaches with XQuery, and combining XQuery and XSL-T.

 
http://www.15seconds.com/issue/050811.htm
                              And Remember This …

***********************************

 

On this day in

  1977

"

The King

"

Died

 

On August 16, 1977 Elvis Presley died at Graceland, his mansion in Memphis,


Tennessee.

 

He was 42 years old.

 

Elvis, The King of Rock and Roll, paid $4


for the privilege of recording a few songs for his mother.

 

The studio owner


liked what he heard

..

 

Elvis had been discovered.

 

In 1955 he gathered a


good following of fans in the South, and in 1956 became a national sensation


with the release of

"

Heartbreak Hotel

"

.

 

He served in the US Army as a jeep


driver from 1958 to 1960, after which his style became more of the romantic


ballad genre.

 

His career turned largely to film making with 27 musicals


being released in the 1960

s.

 

In the seventies, Elvis gained a lot of


weight by eating junk food, and became addicted to prescription drugs.

 

His


physical and mental health declined.

 

The doctors ruled that he died of a


heart attack, but there are many who believe he committed suicide.

 

(There


are also those who believe he

s still alive, but they are probably also


members of the

"

Flat Earth

"

society!)

 

He is buried in the grounds of


Graceland.

     

Today was also the day that in:

1829

Siamese twins Chang and Eng


Bunker arrived in Boston to be exhibited;

1863

the Emancipation


Proclamation was signed (US);

1896

gold was discovered in the


Klondike;

1898

the Roller Coaster was patented;

1934

US


explorer William Beebe descended 3,028

(1922 m)in is Bathysphere;

1955

Fiat ordered the first privately owned nuclear reactor;

1960

Cyprus


gained independence from Britain;

1960

the Republic of the Congo


(Zaire) was formed;

1963

The Dominican Republic regained


independence;

1984

a Los Angeles jury acquitted auto make John


DeLorean of cocaine charges;

1985

Madonna married actor Sean Penn;


1988

IBM introduced its Artificial Intelligence software;

 

Born today were: in

1897

circus master Robert Ringling;

1899

actor Glenn Strange;

1902

English novelist Georgette Heyer;

1910

actress Mae Clarke;

1913

Israeli Prime Minister Menachem Begin;


1925

actress Fess Parker;

1930

actor Robert Culp;

1930

English poet laureate Ted Hughes;

1932

singer Eydie Gorme;

1935

actress Julie Newmar;

1936

actress Anita Gillette;

1936

actor Gary Clarke;

1938

actress Ketty Lester;

1939

English


actress Carol Shelly;

1946

actress Lesley Ann Warren;

1953

musician James Taylor;

1953

TV personality Kathy Lee Gifford;

1957

musician Tim Farriss;

1958

singer and actress Madonna (Ciccone);


1960

actor Timothy Hutton;

 

Recommended for you...

Web 3.0 and the Future Of Web Development
Rob Gravelle
Jun 23, 2022
CodeGuru and VBForums Developer Forums and Community
James Payne
Apr 7, 2022
Understanding CSS Template Layout
Vipul Patel
Mar 29, 2022
Criminals Pay More for Code Signing Certificates Than for Guns or Passports
HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.