/introduction/newsletter_archive/goodiestogo/article.php/3526981/Goodies-To-Go-Newsletter-348.htm Goodies To Go! Newsletter #348

Goodies To Go! Newsletter #348

By Vince Barnes

Goodies to Go (tm)
August 2, 2005 -- Newsletter # 348
This newsletter is part of the internet.com network.


Featured this week:
*   Goodies Thoughts - Get The Red Out

*   Q & A Goodies
*   News Goodies
*   Feedback Goodies
*   Windows Tech Goodie of the Week 
*   And Remember This...
Get The Red Out
It has become the number one question that we are receiving these days and it surprises me.  It goes something like: "I created a page and put a picture on it, uploaded it to my server and now when I look at it all I get is a red 'X' where the picture is supposed to be.  What went wrong?"
Most of you reading this newsletter will already know the answer to the question, but I wonder if you have thought of why it becomes a problem so frequently.
The problem, of course, is that the picture file is being referenced by its name only and the picture file is not in the same directory as the web page file, or, the picture file reference includes a path which is not the correct path on the server for the location of the picture file.  (If you or someone you know would like more info, there's a primer at http://www.htmlgoodies.com/primers/html/article.php/3478181 and there are some more thoughts here: http://www.htmlgoodies.com/introduction/newsletter_archive/goodiestogo/article.php/3476641 )
I sat down with a young HTML student recently as they studied the addition of pictures to a page and went through the entire process including the upload to the server.  I was in observation mode only and did not interfere or help in any way -- I wanted to observe the thought process in action.  This student fell right into it -- after uploading the page they got the red 'X' and no picture.  The reason?  That's right, they uploaded the page file but not the picture file.
Talking with them about it afterwards they told me that they didn't need to upload the picture file as well because it was already included in the page -- they knew because they could see it there.
Such a simple conceptual misunderstanding, but perhaps it shouldn't be so surprising.  If you add a picture to a Word document, or to a spreadsheet, etc., it actually does include the image in the document itself.  It is not necessary to keep the image file along with the document.  In fact, you can create a "link" to an external image file if you wish to, but you have to go out of your way to do it.  The most common result is for the word processor or spreadsheet program to copy the image data right into the document.  This is the opposite of web page creation.
I will be taking care to point out this difference in the future when I am coaching a beginner and urge you, should you find yourself in a similar position, to do the same.
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
Q. I can never get an image flip to work. I try to do more than one flip on a page, but it only flips one picture, and the rest remain the same. Also, when
I put on picture in, it was replaced by another picture. Then, when I put my mouse over another, it changes, but it changes to the red X in the white
square, when I've quadruply checked to see if it was there. I just can never get it to work. Any suggestions?
A. The best I can do is give you an example of one way to accomplish it.  Here it is:
  <title>Image Flip</title>
  <script language="JavaScript">
   function flip(img,imgn)
<a href="somepage.html" onMouseOver="flip('1.gif','pica')" onMouseOut="flip
<img src="0.gif" name="pica" border="0"></a><br>
<a href="somepage.html" onMouseOver="flip('3.gif','picb')" onMouseOut="flip
<img src="2.gif" name="picb" border="0"></a>
You will notice that when I mouse over the image it passes to the function the image to display and the name of the img tag that I want to affect.  The
function called flip is rather simple in that it uses the image array to change the image by specifying the name of the image tag.
Q. I have successfully used the script below to open a fixed size new window containing a graphic. The idea is that the original web page contains a number of small photo images that can be seen as larger versions in the pop-up. What I want to do is have the user click on the small graphic itself in order to open the new window, rather than have a button that they have to click, which is how the existing code works.
<SCRIPT language=JavaScript>
var width,height
var image,ext
var cond1,cond2
function transferview(image,width,height) {
if (width==0) cond1=" "
else cond1="width="+(width+20)+"";
if (height==0) {cond2=" "};
else {cond2="height="+(height+70)+""};
var s1 ="<TITLE>The Irish Coat</TITLE>"
var s15=""
var s2 ="<CENTER><IMG SRC='"+image+"' BORDER=0>"
var s3 ="<FORM><INPUT TYPE='BUTTON' VALUE='Close Window'"+ "
onClick='self.close()'>" var s4 ="</FORM></CENTER>"
type=button value="Larger Image"> </FORM>

A. You can set up an image link like so that when clicked on will open the
<a href="javascript:transferview('GlendowanShanntialarge.jpg',500,500)"><img src="mypic.gif" border="0"></a>

Q. I want to make a list of links for navigation in the form of a JavaScript file, so that I can use one file and call it up from multiple pages without the use of frames.  I found a tutorial on making js files & calling them from another page, but I haven't found how to make a plain text link using javascript.
A. You could try using document.write() to create your text links.  For example:
document.write("<a href='somepage.html'>Click Me</a>")
Just make sure you use single quotes within double quotes or vice versa.  Also you might want to place the script within a div to help position it.
[Also, take a look at the Goodies Thoughts sections in: http://www.htmlgoodies.com/letters/230.html and http://www.htmlgoodies.com/letters/231.html -- Ed.]
News Goodies
Oracle Flexes Muscle in India
[August 2, 2005] The software company has set its eyes on Asia, buying Citigroup Venture's majority stake in i-flex.
Read the article:

WebEx Wins Over Collab Suite
[August 2, 2005] The Web conferencing specialist pays $45M for the maker of on-demand collaboration apps for SMB customers.
Read the article:

IBM Improves Customer Views in Suite
[August 2, 2005] The company's DWL acquisition helps to consolidate the customer snapshot.
Read the article:

Novell Files Counterclaim Against SCO
[August 2, 2005] New legal filing brings Microsoft and Sun into the picture.
Read the article:

Grid Meets P2P
[August 2, 2005] A Grid Forum paper looks at ways to make grid computing and peer-to-peer applications work together.
Read the article:

Spyware Skyrockets on Greynet Fuel
[August 2, 2005] The applications are finding their way into the enterprise.
Read the article:

Dogpile: Search Engines Don't Have Much in Common
[August 2, 2005] The Meta-search service shows diversity of results from the top players.
Read the article:

MSN Shopping Updates Storefront
[August 1, 2005] Its new comparison shopping site expands search and personalization.
Read the article:

On Wings of RFID, Supplying 'TrueDemand'
[August 1, 2005] RFID middleware company focuses on predictive supply chain software. 
Read the article:

FCC Chief Pushing For DSL Deregulation
[August 1, 2005] New FCC chairman circulating proposal to give telcos' broadband the same status as cable modems.
Read the article:

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:
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 http://www.htmlgoodies.com/mentors/
Thanks for all your feedback!

Windows Tech Goodie of the Week 

Maintaining Database Consistency with Transactions in .NET
While databases can efficiently hold and query large amounts of information, all that data is useless if its integrity is questionable.  Transactions help ensure that a database's data remains consistent.  This article examines how to wrap multiple SQL statements within an atomic database transaction using the SqlTransaction class in the System.Data.SqlClient namespace.

*** AND ***
N-Tier Web Applications using ASP.NET 2.0 and SQL Server 2005 - Part 2
In the second part of his series on building N-tier web applications using ASP.NET 2.0 and SQL Server 2005, Thiru Thangarathinam covers the business logic and user interface layers.  In the process, he also examines some new features in ASP.NET 2.0 that greatly simplify the development process.

*** AND ***

Download ASP.NET Sample Code
It can be useful to allow web users to download files from your site.  For many file types accomplishing this is trivial... just upload the file and link to it.  This works great for things like zip files, setup programs, and many others, but what if you want users to download a file that browsers normally open?
And Remember This ...
On this day in...

1934 Hitler Became F|hrer of Germany
German Chancellor Adolph Hitler became the absolute dictator of Germany, taking the title of "F|hrer" (Leader).  In 1933 German President Paul von Hindenburg made Hitler Chancellor, hoping the having a cabinet position would calm his zeal.  Hindenburg underestimated Hitler's intentions and audacity.  Hitler used the burning of the Reichstag building (Parliament) as an excuse to bring about a general election.  His friend and Nazi ally Hermann Goering used the police to suppress the Nazi's opposition in the election, so that they won a majority.  Citing the dangers facing Germany, Hitler used the Enabling Acts to take on the power of Dictator.  He used this position to arrest and eliminate the rest of his opposition, and when Hindenburg died on August 2, 1934, he combined the office or President with that of Dictator giving himself, as leader of the Third Reich, absolute power in Germany and taking the title "F|hrer".  He promised Germany that the Third Reich would last a thousand years.  It lasted eleven.
Today was also the day that in: 1375 the first roller skating rink was opened (in London); 1798 Admiral Horation Nelson defeated the French in the Battle of the Nile; 1832 the Illinois militia, with 1,300 men, defeated the Sac an Fox Indians in the Battle of Bad Axe River, Wisconsin, ending the Black Hawk War; 1909 the US army took their first delivery from the Wright Brothers and created the Army Air Corps; 1934 the Hatch Act was passed (US) prohibiting political activity by federal employees; 1965 reporter Morley Safer sent back the first report from Vietnam to indicate that the US was losing the war; 1979 "Gilda Radner Live From New York" opened on Braodway (I was there on your closing night, Gilda, & I'll not forget you.); 1989 NASA confirmed Voyager 2 had discovered three new moon of Neptune; 1990 Iraq invaded Kuwait; 1991 Hedy Lamar was arrested in LA for shoplifting;

Born today were: in 1696 Ottoman Sultan Mahmud I; 1754 architect and Washington DC designer, Pierre Charles L'Enfant; 1905 actress Myrna Loy; 1914 actor Gary Merrill; 1916 actress Beatrice Straight; 1922 actor Carroll O'Connor; 1926 department store mogul Betsy Bloomingdale; 1932 Irish actor Peter O'Toole; 1934 actor Albert Hall; 1939 singer Edward Pattern (Gladys Knight & the Pips); 1942 musician Garth Hudson (The Band); 1944 actress Joanna Cassidy; 1955 actress Roberta Wallach; 1960 actress Patricia Kotero (Apollonia); 1973 actress Kia Goodwin;

  • 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