Goodies to Go ™
April 11, 2006 — Newsletter # 384
************************************************************
All Goodies To Go
newsletters are sent from the domain “internet.com.” Please use this
domain name (not the entire “from” address, which varies) when configuring
e-mail or spam filter rules, if you use them.
Featured this week:
* Q &
A Goodies
* Discussion Goodies
* News Goodies
* Feedback Goodies
* Windows Tech Goodie of the
Week
* And Remember This…
local car dealer here proclaims) and many other examples illustrate how we love
to bandy around adjectives whose real meaning is so large and whose scope
encompasses so much that we could not possibly support the claim in anything
resembling reality. How then is the humble programmer to understand when,
in a field where precision is paramount and everything is either just right or
simply wrong, we take such an adjective and apply it to a simple programming
task? How indeed?! The answer, as you are probably aware by now, is by
reading Goodies To Go, where programming tasks, when simply explained, become
simple!
for using the word “global” for a wide variety of things of varying scope.
Global, of course, is meant to refer to the globe we know as Earth, and means
something whose scope affects the whole world. Euphemistically, that’s
just how we use it, but the question is, what do we mean by our “world” when we
do?
element used to hold a value that changes, as opposed to a constant, which is a
data element whose value does not change. Various program languages will
refer to “global” and “local” variables. The difference between the two is
whether they are confined to a specified scope or are available outside that
scope. What the scope is depends on the language and sometimes even on the
context.
function using the “var” keyword. The value of this variable will
unavailable to any other function on the page, or to any JavaScript code outside
the function. JavaScript variables defined without the “var” keyword, or
defined outside a function, are global. A global variables value is
available to any function or any JavaScript code on the page. Thus, the
scope, or “world”, referred to by “global” in reference to JavaScript
variables is a particular JavaScript function. Any JavaScript code
on a different page, even though it is part of the same website and held on the
same server, might as well be on a different planet as far as that variable is
concerned!
task that programmers face. For example, if you copy some HTML code from
this newsletter into a page you are working on, we have advised you to perform a
global edit on the opening tag markers to change “<.” into “<” so that
they will work on your page (see the note at the beginning of the Q & A
Goodies section.) In this case, “global” means “more than one at a
time.”
) it is up to me to define the scope that I want “global” to mean. I can
open a file and replace each instance f a string in that file; or I can open
several files and replace every instance of a string in all of them. I can
also instruct it to replace a string in every file having a name matching a
pattern I specify and residing in a directory (a folder) I specify. I can
also say whether or not to search within subdirectories. In this way I can
define my “world” far a global edit and can save a lot of time by so
doing.
I have, a well thought out global edit can restore harmony to the system.
If only it were that easy with that other kind of global peace.
Thanks for reading!
***********************************
Questions are
taken from submissions to our Community
Mentors. You can ask a Mentor a
question by going to
https://www.htmlgoodies.com/mentors/
XXXXXXXXXXXXXXXXXXXXXXXXXX
X
X
X Please take note: X
X
X
XXXXXXXXXXXXXXXXXXXXXXXXXX
are interpreting code examples in this newsletter as actual HTML code instead of
text. To overcome this problem and to enable everyone to read the
newsletter, there is a period after the “<” in each tag. If you cut and
paste to try out code examples, please remember to remove the periods.
Wherever we intend you to use “<.” in your code, the example will show
“<..”. In this way, you will be safely able to use a global edit to
change “<.” to “<“. Thanks to all of you for your patience with
this; if this technique creates an undue problem for you however, please let us
know via our feedback address (see Feedback, below).
*** This question was submitted to our Mentor
Community.
The answer was provided by one of our
Mentor Volunteers
Q. I have a piece of Java
script I got off the HTML goodies page to open a new window. It works well
enough but what I want it to do is to run from an onClick event handler. How do
I get it to do this.?
call the function either by using the onClick or by placing the function call in
the “href”. Here is an
example:
<.html>
<.head>
<.title>Open
new window<./title>
<.script
LANGAUAGE=”javascript”>
function
OpenWin()
{
MessageWin=window.open (“http://www.wsabstract.com“,
“newwin”,config=”location=no,status=no,directories
=no,toolbar=no,scrollbars=no,menubar=no,resizable=no”);
}
<./script>
<./head>
<.body>
<.center>
<.a href=”JavaScript:OpenWin()”>Click
here<./a> <.br>Or you can use the onClick
event:
<.a
href=”#” onClick=”OpenWin()”>Click
here<./a>
<./center>
<./body>
<./html>
variable that contains the link you want to open up in the new window like
this:
<.html> <.head>
<.title>Open new
window<./title>
<.script
LANGAUAGE=”javascript”>
function
OpenWin(linkid)
{
MessageWin=window.open
(linkid,
“newwin”,config=”location=no,status=no,directories=no,toolbar=no,scroll
bars=no,menubar=no,resizable=no”);
}
<./script>
<./head>
<.body>
<.center>
<.a
href=”JavaScript:OpenWin(‘https://www.htmlgoodies.com’)”>Click here<./a>
<.br>Or you can use the onClick event:
<.a href=”#”
onClick=”OpenWin(‘https://www.htmlgoodies.com’)”>Click here<./a>
<./center> <./body> <./html>
*** This question was submitted to our Mentor
Community.
The answer was provided by one of our
Mentor Volunteers
Q. I need to set the
background to ivory for the cells within my links table and also to center text
witin each cell, make font size 8 points, and change text to uppercase. Here is
the html code:
<.table id=”links”>
<.tr>
<.td>
<.a href=”#”>Home
Page<./a>
<./td>
<.td>
<.a
href=”#”>Tickets<./a>
<./td>
<.td>
<.a
href=”#”>Events<./a>
<./td>
<.td>
<.a
href=”#”>Tour<./a>
<./td>
<.td>
<.a href=”#”>Contact
Us<./a>
<./td>
<./tr>
<./table>
body {background-image: url(back.jpg)}
b
{color: blue}
a {text-decoration: none; color: black}
a: hover {color:
red; text-decoration: underline}
#links {width: 100%; border-bottom: solid
red 3px; center center;
font-size: 8pt; font-family: Arial, Helvetica,
sans-serif;
text-transform: uppercase}
td {background-color: ivory;
center center; border: groove red 5pt}
#calendar {float: right; border:
groove red 10pt; width: 75%}
th {background-color: lightblue; font-family:
Arial, Helvetica,
sans-serif;
border: solid blue 1px}
.prev
{border-style: none; background-color: white}
.next {border-style: none;
background-color: white}
A. Your css should look something like this:
#links
{
width: 100%;
border-bottom: solid red 3px; }
#links td
{
background-color: ivory;
font-size:
8pt;
font-family: Arial, Helvetica,
sans-serif;
text-transform: uppercase;
text-align:
center;
border: groove red 5pt; }
want to center something, use the “text-align: center;” definition for your
style.
Community.
The answer was provided by one of our
Mentor Volunteers
Q. I love the Dual Image Flip
effect. Instead of buttons I’d like to put plain old links. I don’t know how to
do this and if I change a thing, it won’t work. Please help! Also, I need
help on putting the image in one place, and placing the text in another. I have
a square box that I need to put the image flip in.
<.html>
<.head>
<.title>Image Flip<./title>
<.script
language=”JavaScript”>
function
flip(img,imgn)
{
document.images[imgn].src=img
}
<./script>
<./head>
<.body>
<.a
href=”somepage.html” onmouseover=”flip(‘1.gif’,’pica’)” onmouseout=”flip
(‘0.gif’,’pica’)”>Mouse Over Me<./a>
<.img src=”0.gif”
name=”pica”
border=”0″><./a><.br>
<./body>
<./html>
As
far as placing the picture it depends on how you have your square box
defined. You could use a table to position the image or even layers such
as <.div> or <.span> in combination with the style tag.
Community.
The answer was provided by one of our
Mentor Volunteers
Q. I would like to do is to
have the main window either resize with no menus (Like a standard pop up window,
but without the pop up) or to have my swish (it’s a product like Flash) come up
in the browser window but sized at the right size without the user being able to
change it.
A. Here is an example of how you can keep the main
window at a set size, but you can change the other properties such as location,
status, directories, etc. <.html> <.head> <.title>Resize
test<./title>
<.script
language=”JavaScript”>
function
doresize()
{
window.resizeTo(600,400)
}
window.onload=doresize
<./script>
<./head>
<.body
onResize=”doresize()”>
<.center>
<.br><.br><.br><.br>
<.h2>Resize<./h2>
<./center>
<./body>
<./html>
Community.
The answer was provided by one of our
Mentor Volunteers
that I can have people become members of my website? If so, do you know
where I could find a layout or a template for that code?
is to password protect an entire folder. Your host may offer this. They would
have to set it up for you. They then give you access to a text file that you can
edit with as many passwords as you need. The other way would require some kind
of scripting and possibly a database to hold the usernames and passwords. The
scripting involved would depend on what you server supports. If it is a Linux
server then you would have to use PERL or PHP. If it is a Windows server then
you can use Active Server Pages(ASP). Take a look here: www.code4u.com. You may find something to
use.
***********************************
a great place to get help from others who, just like you, are developing web
pages. Many different topics appear in the forum, and a new one will
appear if you create it! Here’s a sample of recent topics:
http://www.webdeveloper.com/forum/showthread.php?threadid=102113
http://www.webdeveloper.com/forum/showthread.php?threadid=101828
"www1":
http://www.webdeveloper.com/forum/showthread.php?threadid=101487
http://www.webdeveloper.com/forum/showthread.php?threadid=102114
http://www.webdeveloper.com/forum/showthread.php?threadid=102057
***********************************
[April 11, 2006] Search engine snaps up
Australian search algorithm and hires its creator.
Read the article:
http://www.internetnews.com/xSP/article.php/3598036
‘Red Boss’: Day 2
[April 11, 2006] Red Hat continues to talk up its
JBoss acquisition during analyst day proceedings.
Read the article:
http://www.internetnews.com/dev-news/article.php/3598236
Skype Buys VoIP Startup
[April 11, 2006] Skype buys Camino Networks
to better compete in the lucrative VoIP market.
Read the article:
http://www.internetnews.com/wireless/article.php/3598191
Finding Revenue in The Classifieds
[April 11, 2006]
Counter-intuitive thinking says new media might be what’s needed to save the
old.
Read the article:
http://www.internetnews.com/ec-news/article.php/3598201
A Wireless Spring in Salesforce.com’s Step
[April 11, 2006] The
on-demand CRM leader’s acquisition of Sendia is a stepping-stone to broader
wireless application adoption.
Read the article:
http://www.internetnews.com/xSP/article.php/3598196
Crosswalk Launches iGrid Storage System
[April 11, 2006] The storage
grid system, the brainchild of McData founder Jack McDonnell, is designed to add
storage capacity when needed and to make every storage volume available to every
application server and end-user.
Read the article:
http://www.internetnews.com/storage/article.php/3598051
IBM’s Answer to Security Blues
[April 10, 2006] Big Blue claims
hardware-based security advance.
Read the article:
http://www.internetnews.com/security/article.php/3598016
Red Hat to Buy JBoss
[April 10, 2006] The $350 million deal will
help Red Hat provide distributed computing platforms for its customers.
Read
the article:
http://www.internetnews.com/dev-news/article.php/3597756
Red Hat, JBoss: The Pros And Cons
[April 10, 2006] Analysts chime in
on what Red Hat’s acquisition of JBoss means for the industry; some like it and
some don’t think it matters at all.
Read the article:
http://www.internetnews.com/dev-news/article.php/3597951
Security Group Calls on Congress
[April 10, 2006] CSIA said without
Congressional action on data breaches, e-commerce and consumer confidence are
likely to erode without national action.
Read the article:
http://www.internetnews.com/bus-news/article.php/3597986
Feedback Goodies
***********************************
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:
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/
Windows Tech Goodie of the Week
***********************************
and display it in a web page. Read on to learn more!
*** AND ***
An Overview of the New Caching Features in ASP.NET 2.0
ASP.NET 1.x, but for those of you who want to do more, Microsoft has added
a number of features which help make caching even more flexible and robust.
In this article I’m going to give you a quick overview of the new caching
features in ASP.NET 2.0 and show you how to use them.
***********************************
of Elks was organized; 1890 Ellis Island in New York was designated as an
immigration station; 1906 Einstein introduced his Theory of Relativity; 1921
Iowa imposed the first state tax on cigarettes; 1941 Germany Blitzed Coventry in
England; 1945 the Allies liberated the first Nazi concentration camp at
Buchenwald, Germany; 1950 Prince Rainier III became ruler of Monaco; 1961 Bob
Dylan (Robert Zimmerman) made his first appearance at Folk City in Greenwich
Village, New York City; 1965 40 tornadoes struck the US midwest, killing 272 and
injuring 5,000 more; 1968 President Lyndon Johnson signed the 1968 Civil Rights
Act; 1981 Ronald Reagan arrived home from hospital after Hinkley shot him; 1992
Euro-Disney opened near Paris France;
Born today were: in 1866 wife of Henry, Carla Ford; 1907 actor Paul
Douglas;1913 designer Oleg Cassini; 1916 producer/director Howard Koch; 1928
wife of Bobby, Ethel Kennedy; 1932 actor Joel Grey (Joe Katz); 1945 musician
Robert Fripp (King Crimson); 1950 actor Bill Irwin; 1955 actress Maria
Scarabelli; 1958 actor John Castellanos; 1966 English singer Lisa
Stansfield;
*************************************************************
EarthWeb’s family of online services for IT insiders
*************************************************************
IT
MANAGEMENT http://www.earthweb.com/dlink.index-jhtml.72.949.-.0.jhtml