In article <cG******************@bignews4.bellsouth.net>,
"SPEAKIT" <SP*****@speaknet.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>FormImage 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(document.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_Earth</li>
<li>clem_full_moon</li>
<li>erosreconstruct_near</li>
<li>giotto_halley</li>
<li>lspn_comet_halley1</li>
<li>hst_pluto_charon</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('Apollo17_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 + "erosreconstruct_near_T.jpg";
var selimage = new Image();
selimage.src = nasaPath + "giotto_halley_T.jpg";
var selimage = new Image();
selimage.src = nasaPath + "lspn_comet_halley1_T.jpg";
var selimage = new Image();
selimage.src = nasaPath + "hst_pluto_charon_T.jpg";
</script>
</body>
</html>