can you help with this, i'm trying to blank the text field if the cancel button is selected ..
<script>
function uploadImage(thefield) {
input_box=confirm(" Upload / Replace image with this file ? ");
if (input_box==true) {
document.image.submit(); }
else {
thefield.value = "";
}
}
</script>
<body>
<form style="margin-top:0; margin-right:0; margin-left:0; margin-bottom:0;" name="image" method="post" enctype="multipart/form-data">
<font face="Verdana" size="2" color="#000000">Upload Product Image:<br>
<input type="file" name="fileName" size="23" value="" onChange="return uploadImage(this);">
</form>
</body>
I can't get the fileName field to default back to a 'blank' text box if the user clicks 'Cancel'.
Any help please, thanks
<script>
function uploadImage(thefield) {
input_box=confirm(" Upload / Replace image with this file ? ");
if (input_box==true) {
document.image.submit(); }
else {
thefield.value = "";
}
}
</script>
<body>
<form style="margin-top:0; margin-right:0; margin-left:0; margin-bottom:0;" name="image" method="post" enctype="multipart/form-data">
<font face="Verdana" size="2" color="#000000">Upload Product Image:<br>
<input type="file" name="fileName" size="23" value="" onChange="return uploadImage(this);">
</form>
</body>
I can't get the fileName field to default back to a 'blank' text box if the user clicks 'Cancel'.
Any help please, thanks