In article <cG************ ******@bignews4 .bellsouth.net> ,
"SPEAKIT" <SP*****@speakn et.net> wrote:
here is an example of something that doesn't work.....lol
I kind of lost track of the changes that I made.
Robert
Try this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title>Fo rmImage Test</title>
<script type="text/javascript">
var nasaPath = "http://spaceplace.nasa .gov" +
"/en/educators/images/solarsystem/";
function dothisnow(name) {
/* Get the reference to the image. */
var picId = document.images["imageId"];
/* Set the name of the image.
This causes the new image to be loaded. */
picId.src = nasaPath + name + "_T.jpg";
}
</script>
</head>
<body>
<form name="myForm">
<p style="text-align: center;">
Please Enter your Photo ID:<br>
<input type=text
name="picid"
size="25">
<br><br>
<input type=button
value="Click Here to See Your Photo"
name="clicker"
onClick=
"dothisnow(docu ment.forms['myForm'].elements['picid'].value);">
<br>
<img id="imageId"
onerror="alert( 'Could not find the image.');">
</form>
<p>Some values to type or to cut and paste:
<ul>
<li>Apollo17_Ea rth</li>
<li>clem_full_m oon</li>
<li>erosreconst ruct_near</li>
<li>giotto_hall ey</li>
<li>lspn_comet_ halley1</li>
<li>hst_pluto_c haron</li>
</ul>
<p>These image are from NASA. See:<br>
http://spaceplace.jpl.nasa.gov/en/ed...s_images.shtml
</p>
<script type="text/javascript">
// Fill in the default image. I am too lazy to type in the
// full path name.
dothisnow('Apol lo17_Earth');
// Best to put the images at the end.
var selimage = new Image();
selimage.src = nasaPath + "Apollo17_Earth _T.jpg";
var selimage = new Image();
selimage.src = nasaPath + "clem_full_moon _T.jpg";
var selimage = new Image();
selimage.src = nasaPath + "erosreconstruc t_near_T.jpg";
var selimage = new Image();
selimage.src = nasaPath + "giotto_halley_ T.jpg";
var selimage = new Image();
selimage.src = nasaPath + "lspn_comet_hal ley1_T.jpg";
var selimage = new Image();
selimage.src = nasaPath + "hst_pluto_char on_T.jpg";
</script>
</body>
</html>