SHARE
Facebook X Pinterest WhatsApp

Goodies To Go! Newsletter #358

Written By
thumbnail
Vince Barnes
Vince Barnes
Oct 11, 2005

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


Featured this week:   *   Goodies Thoughts – Future Computing

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

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

  Future Computing
 

As I mentioned last week, today finds me in a hotel room in Las Vegas.

 

It

s


great to be here, and if you have never been here I would highly recommend


that you add it to your

"

to visit

"

list

somewhere near the top (right


after Central Florida, perhaps!!)

 

I went last night to see one the Cirque


Du Soleil shows here and you have never seen one of these sensory


spectaculars then that

s another thing to add to your to do list!!

 

Amazing!!

 

Apart from the fun, I am actually here for the Citrix iForum conference.

 

Last week I also talked about the future of the web and how it could be used


to deliver information in ever more complex, complete and convenient ways.

 

Citrix is all about access

access to information and to software.

 

They


talk about access anywhere, on any device

and they can deliver it!

 

Take


a look at

http://www.citrix.com

if you

d


like to know more about their product lines.

 

In his Keynote speech, Citrix CEO Marc Templeton talked about the increase


in the use of web applications versus traditional client-server application


for delivering information in the corporate world.

 

He cited a report that


predicts that by 2008 more people in that world will be relying on web


applications than client-server applications.

 

And what does that mean for


you?

 

It means that if you are studying the skills of web development, you


are studying one of the most in-demand areas of the programming world!

 

That


means you

re on the right track

and we at HTML Goodies will be here to


help you in that endeavor.

 

One of Citrix

products is Go To My PC, which they acquired a couple of


years or so ago.

 

The have developed this into a highly secure, easy to use


remote access solution.

 

It has quite a wide variety of applications, but


one which stands out as a possibly very useful tool for you is the simple


ability to connect to and take control of your computer from just about


anywhere.

 

No big deal, you might say, there are lots of solutions for


that.

 

Consider, however, that Go To My PC works without requiring any


special software to be installed on the computer you are using to access


your machine, and it will work just fine even if your computer is behind a


firewall/router which in turn is sitting on a dynamic IP address connection


(such as most broadband connections.)

 

Add to that all the security Citrix


has built in and you can start to see what sets this product apart.

 

I will be writing some more about some of the tools I have seen here

Ill


keep you posted!

     

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

m stuck on having a page containing a drop-down with options, but I want


to click on my option and go to that place.

  A.

Here is an example that you can use,


<

html

>


 

<

head

>


 

<

title

>

Drop Down

<

/title

>


 

<

script language=

"

JavaScript

"

>


   

function LinkUp(selopt)


    

{


     

if(selopt!=

"

"

) // if variable is not empty (they selected the first


option)


       

{


        

location.href=selopt


       

}


    

}


 

<

/script

>


 

<

/head

>


 

<

body

>


 

<

form name=

"

DropDown

"

>


   

<

select name=

"

DDlinks

"


onchange=

"

LinkUp(this.options

[

this.selectedIndex

]

.value)

"

>


    

<

option value=

"

"

>

Select One

<

/option

>


    

<

option value=

"

http://www.siteone.com

"

>

Site


One

<

/option

>


    

<

option value=

"

http://www.sitetwo.com

"

>

Site


Two

<

/option

>


    

<

option value=

"

http://www.sitethree.com

"

>

Site


Three

<

/option

>


   

<

/select

>


 

<

/form

>


 

<

/body

>


<

/html

>

       
Q.

When I have a user enter a number to be used for math it is treated as a


string.

 

Then when I do math with it the number is added to the end which


makes the answer incorrect.

 

Can you please give me a method for the user to


be able to enter a number and have it treated like a value instead of a


string?

 

Or if not, is there a way to convert strings into values?

  A.

JavaScript interprets a default value given to a text area as a string.

 

The workaround is to use the eval() function when processing that value as a


number.

 

If your user inputs a number to a text area in a form, and that


number is to be added, subtracted, mutiplied,

etc, process the number


within the eval() function. From your previous example, suppose the user


inputs to the variables a and b via text boxes in a form, you can then add a


to b to return c with this:


c = eval(a+b)


This way, the values in both a and b will be treated as numbers instead of


strings.

       

Q.

I have one more problem with JavaScript programs.

 

A lot of times I


create variables and then when I try to use them I get an error saying that


they are undefined.

 

Why is this?

 

Here is an example of when this happens:


<

SCRIPT LANGUAGE=

"

JavaScript

"

>


function part1()


{


var a = 1;


}


function part2()


{


if (a == 1)


{


document.form.textbox.value =

"

The variable worked, finally!!!

"

;


}


}


<

/SCRIPT

>


<

/HEAD

>


<

BODY

>


<

FORM NAME=

"

form

"

>


<

INPUT TYPE=

"

RADIO

"

NAME=

"

why_doesnt

"

VALUE=

"

the_variable_work

"


onClick=

"

part1();

"

>


<

INPUT TYPE=

"

BUTTON

"

VALUE=

"

Variable work?

"

onClick=

"

part2();

"

>


<

INPUT TYPE=

"

TEXT

"

NAME=

"

textbox

"

VALUE=

"

If the variable worked, a message


would appear here.

"

>


<

/FORM

>


If I write this in a document and click the button, an error message comes


up saying that it is undefined.

 

I

ve tried creating the variable directly


from the event handler, renaming the variable, using checkboxes instead of


radio buttons, and nothing works.

 

I have tried putting an alert box in the


function and it comes up so I know the function is executing.

 

It just won

t


remember the variable.

  A.

You are declaring a as a variable from within a function. This makes it a


local variable that is only accessable by that function.

 

You can make it a


global variable that is accessable by any function by declaring it from


outside any functions, but still between the script tags. Usually global


variables are declared before the first function for the sake of clarity,


but they can be declared from anywhere between the script tags, just not


inside a function. Here

s your script with a as a global variable:


<

SCRIPT LANGUAGE=

"

JavaScript

"

>


var a = 0; // declares a as a global variable and initializes it to 0


function part1()


{


a = 1; // the function sets the global variable a to equal 1


}


function part2()


{


if (a == 1)


{


document.form.textbox.value =

"

The variable worked, finally!!!

"

;


}


}


<

/SCRIPT

>


<

/HEAD

>


<

BODY

>


<

FORM NAME=

"

form

"

>


<

INPUT TYPE=

"

RADIO

"

NAME=

"

why_doesnt

"

VALUE=

"

the_variable_work

"


onClick=

"

part1();

"

>


<

INPUT TYPE=

"

BUTTON

"

VALUE=

"

Variable work?

"

onClick=

"

part2();

"

>


<

INPUT TYPE=

"

TEXT

"

NAME=

"

textbox

"

VALUE=

"

If the variable worked, a message


would appear here.

"

>


<

/FORM

>

       
    
Q.

I

m making a website with a

"

fixed

"

background.

 

I can

t figure out how


to make the picture fit the browser perfectly on everybody

s system.

 

Is


there a code I can place inside my document to alter the fixed background to


fit the browser?

 

My site content will go into a smaller screen/box within


the background so there is no need for scrollers on my outside browser and


my background image doesn

t need to be tiled because it basically is my


site.

  A.

You can use Cascading Style Sheets to fix a background image. The code


would have to be edited for your particular situation and image but here is


the code:


<

style type=

"

text/css

"

>


body {


background-image: url(

"

/images/your_image_name.gif

"

);


background-repeat: no-repeat;


background-attachment: fixed


}


<

/style

>

       
    
Q.

I am trying to figure out how to make a check box on an HTML form checked


by default.

  A.

If you want a check box to be checked when the page opens you can do it


without JavaScript like this:


<

input type=

"

checkbox

"

id=

"

ckbox

"

checked

>


With JavaScript you can set the checked property to true when the page loads


like this:


<

script type=

"

text/javascript

"

>


 

document.form_name.check_box_name.checked=true


<

/script

>


The above will work if there is only one checkbox.

 

If you have multiple


checkbox

s with the same name then you have to specify itslocation in the


array like this:


<

script type=

"

text/javascript

"

>


 

document.form_name.check_box_name

[

0

]

.checked=true


<

/script

>


The above would set the first checkbox

s checked property to true.

         
    
Q.

I am looking for JavaScript help in order to pre-select a option in a


select field inside a form.

 

I am using server-side scripting (PHP) in order


to provide the selected value.

  A.

You could use PHP to create your option tag and select the option you


want that way.

 

I have a small Help Desk application written in PHP that I


have set up dropdowns to select the date.

 

I have them default to the


current date.

 

Here is an example of the dropdown for the


month:


<

select name=

"

beg_req_month

"

>


  

<

?php


  

for($i=1;$i

<

=12;$i++)


       

{


        

if($i==$prob_month)


          

{print

"

<

option value=

"

. $i .

"

selected

>

"

. $i .


"

<

/option

>

n

"

;}


        

else


          

{print

"

<

option value=

"

. $i .

"

>

"

. $i .

"

<

/option

>

n

"

;}


       

}


  

?

>


  

<

/select

>


The variable $prob_month is set to the current month in some previous code.

 

For Javascript to set the selected option you would use a statement like


this (which sets the first option tag to selected):


document.form_name.select_name.options

[

0

]

.selected=true


[

Beware of the period following the less than symbol in the

"

for

"

statement


above

this is one of the periods inserted as a part of the technique


mentioned in the note at the beginning of this section

&

does not belong in


the code you execute

Ed.

]

             

News Goodies

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

  Microsoft, RealNetworks End Legal Battle

[

October 11, 2005

]

One of the most bitter legal battles in the technology


industry is ending today.


Read the article:



http://www.internetnews.com/bus-news/article.php/3555311
 
Microsoft Addresses Tardy Patch

[

October 11, 2005

]

The company releases three critical, four important and


two moderate security bulletins, including one held from last month.


Read the article:



http://www.internetnews.com/security/article.php/3555431
 
When Applications And Databases Collide

[

October 11, 2005

]

You get loosely coupled data services, according to


Microsoft officials during the VSLive keynote.

  

Read the article:



http://www.internetnews.com/dev-news/article.php/3555386
 
Are SMBs Unhappy With Remote Access?

[

October 11, 2005

]

A new study claims 80 percent of SMBs think SSL-VPN is


too expensive for them.


Read the article:



http://www.internetnews.com/stats/article.php/3555356
 
BEA Buys RFID Software Maker

[

October 11, 2005

]

UPDATED: The company will build business processes based


on ConnecTerra

s RFID offerings.


Read the article:



http://www.internetnews.com/ent-news/article.php/3555326
 
A Hardware Sentinel to Watch Over Databases

[

October 11, 2005

]

Firewall vendor Imperva is set to roll out a hardware


solution to a database problem: policing database queries.


Read the article:



http://www.internetnews.com/security/article.php/3555231
 
Dual-Core Xeon Looks to Catch AMD

[

October 10, 2005

]

Some thirty OEMs plan systems based on latest Intel


dual-core offering, but next year

s Bensley platform is more significant


rollout.


Read the article:



http://www.internetnews.com/ent-news/article.php/3555211
 
A Faster Path to 802.11n?

[

October 10, 2005

]

A new vendor consortium hopes to ram through its own


high-speed Wi-Fi standard, maybe in less than a year

and perhaps at the


cost of the open standards process.


Read the article:



http://www.internetnews.com/wireless/article.php/3555141
 
Yahoo Launches Podcast Search

[

October 11, 2005

]

Audio discovery tool comes as study shows RSS becoming


mainstream.


Read the article:



http://www.internetnews.com/ec-news/article.php/3555226
 
Microsoft, IBM Give Back to The Little Guy

[

October 10, 2005

]

The companies release service offerings for small


businesses.

 

Read the article:



http://www.internetnews.com/bus-news/article.php/3555131
     
 
 
 
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 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 

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

  Displaying Browser-Friendly RSS Feeds  

Over the past several years the popularity of website syndication through


XML syndication standards like RSS and ATOM has flourished.

 

Unfortunately,


the raw XML feeds aren

t the most visually appealing things and, when


clicked on by the less tech-savvy user, they can be confusing.

 

Fortunately


this confusion can be alleviated through the simple use of an XSL stylesheet.

 
http://www.4guysfromrolla.com/webtech/100505-1.shtml
 
*** AND ***  
A Quick Look at Xamlon Web
 

Have you ever wanted to deploy a WinForms application to the web or wished


you could build fancy Flash-based user interfaces easily?

 

If so, then


Xamlon Web might just be the product for you.

 

Xamlon Web allows you to


create WinForms applications in C# or VB.NET and deploy them anywhere on the


web using Macromedia Flash without any previous Flash experience.

 
http://www.15seconds.com/issue/051006.htm
 
*** AND ***  
Basic Authentication at its Most Basic
 

Basic authentication has gotten a bad reputation over the years.

 

So it

s


not as flexible as forms authentication and not as secure as NT Challenge


Response, it has something going for it that neither of these does

it

s


basic

as in simple!

 
http://www.asp101.com/tips/index.asp?id=126
                          And Remember This …

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

  1899

Boer War Began

 

On this day in 1899 war began between the British Empire and the Boers, also


known as Afrikaners, in the Transvaal and Orange Free State in South


Africa.

 

During the Napoleonic wars, in 1806, Britain took possession of the


Dutch Cape colony of Afrikaners, who were the descendants of the original


Dutch settlers of the area.

 

The Boers objected to the Anglicization of


South Africa and to Britain

s anti-slavery policy, and began to move out


into tribal territories, where they created the Transvaal and the Orange


Free State and for a while, lived in peace with the British.

 

In 1867 the


discovery of gold and diamonds in the area sparked conflicts.

 

In 1899 full


scale war began.

 

For some time the Boers, using Guerilla tactics,


frustrated British efforts.

 

In 1901 the British began a search and capture


campaign, gathering the families of Boer soldiers into concentration camps.

 

By 1902 the Boer resistance was defeated and on May 31, 1902, the Peace of


Vereeniging was signed.

 

In 1910, the British created the autonomous Union


of South Africa, which included the province of the Transvaal, the Orange


Free State, the Cape of Good Hope, and Natal.

 

Today was also the day that in:

1737

300,000 were killed by an


earthquake in Calcutta, India;

1890

the Daughters of the American


Revolution was founded;

1923

the German Mark fell to 4 billion per


US$ (the paper was more expensive than its face value);

1945

the


Chinese Civil War started (Chiang Kai-Shek v Mao Tse-Tung);

1975

"

Saturday Night Live

"

premiered with guest host George Carlin;

1981

an unknown rocker known only as Prince opened for the Rolling Stones at LA

s


Coliseum; 1

983

Last hand-cranked telephones US went out of service as


440 telephone customers in Bryant Pond, Maine, were switched over to


direct-dial;

1986

Reagan

&

Gorbachev opened talks at a summit in


Reykjavik, Iceland;

1987

200,000 gays marched for civil rights in


Washington DC;

1990

Center for Urban archaeology opened in NYC at the


South Street Seaport Museum;

1991

Anita Hill testified that Clarence


Thomas sexually harassed her;

 

Born today were: in

1821

YMCA founder Sir George Williams (England);


1844

food company founder Henry John Heinz;

1884

US First Lady


Eleanor Roosevelt;

1925

actress Nancy Guild;

1946

actor Felton


Perry;

1948

musician Daryl Hall;

1950

actress Catlin Adams;


1953

actor David Morse;

1962

comedienne Joan Cusak;

1962

Leslie Landon;

1971

actor Luke Perry;

1975

actress Kellie


Martin;

 
 

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.