B
Brian D
There has got to be a better way to do this instead of using the iframe
tag. I am looking for a solution that doesn't reload the entire page.
There will much more than the select tag on the initial page.
When it is in production, getimage.asp will have a DB lookup to
determine the file name and imageID will actually be a number (not the
filename).
Also it doesn't seem to work in Firefox.
Thanks
Brian
------------------------------------
<html>
<head>
<title>Image Test</title>
<script language="JavaScript">
function getImageList()
{
imageID =
document.form1.imageID.options[document.form1.imageID.selectedIndex].value;
document.frmRemote.location = "getImage.asp?imageID="+imageID
}
</script>
</head>
<body>
<table height=10>
<tr>
<td>
<form name="form1">
<select name="imageID" size="1" style="width:135px;"
onChange="getImageList();">
<option value="">Image ...</option>
<option value="external.jpg">1</option>
<option value="getacro.gif">2</option>
<option value="go.gif">3</option>
</select>
</form>
</td>
<td>
<iframe name="frmRemote" scrolling="no" id="frmRemote"
height="25"></iframe>
</td
</tr>
</table>
</body>
</html>
[getImage.asp]
<%@ Language=VBScript %>
<%imageID = trim(Request("imageID"))%>
<html>
<head>
</head>
<body leftmargin="0" topmargin="0">
<%if not imageID = "" then%>
<img src="/images/<%=imageID%>"></img>
<%end if%>
</body>
</html>
tag. I am looking for a solution that doesn't reload the entire page.
There will much more than the select tag on the initial page.
When it is in production, getimage.asp will have a DB lookup to
determine the file name and imageID will actually be a number (not the
filename).
Also it doesn't seem to work in Firefox.
Thanks
Brian
------------------------------------
<html>
<head>
<title>Image Test</title>
<script language="JavaScript">
function getImageList()
{
imageID =
document.form1.imageID.options[document.form1.imageID.selectedIndex].value;
document.frmRemote.location = "getImage.asp?imageID="+imageID
}
</script>
</head>
<body>
<table height=10>
<tr>
<td>
<form name="form1">
<select name="imageID" size="1" style="width:135px;"
onChange="getImageList();">
<option value="">Image ...</option>
<option value="external.jpg">1</option>
<option value="getacro.gif">2</option>
<option value="go.gif">3</option>
</select>
</form>
</td>
<td>
<iframe name="frmRemote" scrolling="no" id="frmRemote"
height="25"></iframe>
</td
</tr>
</table>
</body>
</html>
[getImage.asp]
<%@ Language=VBScript %>
<%imageID = trim(Request("imageID"))%>
<html>
<head>
</head>
<body leftmargin="0" topmargin="0">
<%if not imageID = "" then%>
<img src="/images/<%=imageID%>"></img>
<%end if%>
</body>
</html>