SHARE
Facebook X Pinterest WhatsApp

Goodies To Go! Newsletter #348

Written By
thumbnail
Vince Barnes
Vince Barnes
Aug 2, 2005

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


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



https://www.htmlgoodies.com/html/basic-html-adding-images/

and there


are some more thoughts here:



https://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



https://www.htmlgoodies.com/mentors/
    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:


<

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

)

"

>


<

img src=

"

0.gif

"

name=

"

pica

"

border=

"

0

"

>

<

/a

>

<

br

>


<

a href=

"

somepage.html

"

onMouseOver=

"

flip(

3.gif

,

picb

)

"

onMouseOut=

"

flip



(

2.gif

,

picb

)

"

>


<

img src=

"

2.gif

"

name=

"

picb

"

border=

"

0

"

>

<

/a

>


<

/body

>

<

/html

>


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

>

"


ImageWindow=window.open(

"

"

,


"

newwin

"

+width,

"

toolbar=no,scrollbars=

"

+scroll+

"

,menubar=no,

"

+cond1+

"

,


"

+cond2);


ImageWindow.document.write(s1+s15+s2+s3+s4)


ImageWindow.document.close()


}


<

/SCRIPT

>


<

FORM

>

<

INPUT


onclick=

"

javascript:transferview(

GlendowanShanntialarge.jpg

,500,500)


"


type=button value=

"

Larger Image

"

>

<

/FORM

>

 

A. You can set up an image link like so that when clicked on will open the



window.


<

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:



https://www.htmlgoodies.com/letters/230.html

and



https://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:



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



http://www.internetnews.com/xSP/article.php/3524566
 
IBM Improves Customer Views in Suite

[

August 2, 2005

]

The company

s DWL acquisition helps to consolidate the


customer snapshot.


Read the article:



http://www.internetnews.com/ent-news/article.php/3524591
 
Novell Files Counterclaim Against SCO

[

August 2, 2005

]

New legal filing brings Microsoft and Sun into the picture.


Read the article:



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



http://www.internetnews.com/ent-news/article.php/3524561
 
Spyware Skyrockets on Greynet Fuel

[

August 2, 2005

]

The applications are finding their way into the enterprise.


Read the article:



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



http://www.internetnews.com/stats/article.php/3524441
 
MSN Shopping Updates Storefront

[

August 1, 2005

]

Its new comparison shopping site expands search and


personalization.


Read the article:



http://www.internetnews.com/ec-news/article.php/3524371
 
On Wings of RFID, Supplying ‘TrueDemand’

[

August 1, 2005

]

RFID middleware company focuses on predictive supply chain


software.

 

Read the article:



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



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

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

  Maintaining Database Consistency with Transactions in .NET  
http://aspnet.4guysfromrolla.com/articles/072705-1.aspx
 

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  
http://www.15seconds.com/issue/050728.htm
 

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
 
http://www.asp101.com/samples/download_sample_aspx.asp
 

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;

 

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.