A. J.
09-02-2003, 06:10 AM
Hi,
I need to display the images in the /images/ directory by using jscript to make the files name available in the drop down box, but I could not.
I found this code it was very helpful
============
<html>
<head>
<script language="javascript">
<!--
function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.mygallery.picture.options[document.mygallery.picture.selectedIndex].value
}
//-->
</script>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><form name="mygallery"><p><select
name="picture" size="1" onChange="showimage()">
<option selected value="me.gif">Picture of me</option>
<option value="myaunt.gif">Picture of my aunt</option>
<option value="brother.gif">Picture of my brother</option>
</select></p>
</form>
</td>
</tr>
<tr>
<td width="100%"><p align="center"><img src="me.gif" name="pictures" width="99"
height="100"></td>
</tr>
</table>
</body>
===========
This code is display speacific images in the drop down box, would you please help me to change it to display all images in the current directory and list the names in the drop down box ??
A. J.
I need to display the images in the /images/ directory by using jscript to make the files name available in the drop down box, but I could not.
I found this code it was very helpful
============
<html>
<head>
<script language="javascript">
<!--
function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.mygallery.picture.options[document.mygallery.picture.selectedIndex].value
}
//-->
</script>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><form name="mygallery"><p><select
name="picture" size="1" onChange="showimage()">
<option selected value="me.gif">Picture of me</option>
<option value="myaunt.gif">Picture of my aunt</option>
<option value="brother.gif">Picture of my brother</option>
</select></p>
</form>
</td>
</tr>
<tr>
<td width="100%"><p align="center"><img src="me.gif" name="pictures" width="99"
height="100"></td>
</tr>
</table>
</body>
===========
This code is display speacific images in the drop down box, would you please help me to change it to display all images in the current directory and list the names in the drop down box ??
A. J.