Hi,
I know this is off topic, but maybe someone has seen this problem before?
I want to reference in javascript my: <input type="image"
name="myInputImage" src="../../images/cancel.gif">. I want to do this in
order that I can switch its image (and make it essentially dissappear). Its
not even showing up in my debug loop of all form elements! And throws an
error if I try to display it in alert box (so is commented out). A regular
<img ...> does work, but i can't use it to submit the form. Any ideas?
Thanks in advance,
Andrew
<html>
<head>
<title>Untitled</title>
<script language="JavaScript1.2">
<!--
function callMe(){
alert("image: "+document.andrewImage.src);
//alert("input image: "+document.whateverForm.myInputImage.name);
document.andrewImage.src="../../images/new.gif";
for(i=0;i<document.whateverForm.elements.length;i++) {
alert("element:" + i + "value:" +
document.whateverForm.elements[i].value);
}
}
//-->
</script>
</head>
<body>
<form name="whateverForm" action="imgtest.cfm" method="post"
enablecab="Yes">
<input type="text" size="20" name="myTextEntry" onblur="callMe();">
<input type="image" name="myInputImage" src="../../images/cancel.gif">
<img src="../../images/save.gif" name="andrewImage">
<input type="Hidden" name="aname" value="anyvalue">
</form>
</body>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists