I've added a form to my webpage which allows for multiple file uploads. I added the input <input type="file" name="photo_upload[]" id="photo_upload" multiple="multiple" />
.
I've tried to add a warning which is only visible if the browser does not support the multiple file feature. I tried this code:
<script type="text/javascript">
var testrange=document.createElement("input")
testrange.setAttribute("multiple", "multiple")
if (testrange.multiple=="multiple"){
document.getElementById('multiple_warning').style.display = 'none';
}
</script>
<div id="multiple_warning" style="background:#FFFF99; border:dashed; border-width:thin;">Sorry, but your browser does not support the multiple file upload feature.<br />
If you have more than one photo to send us, please send it after you recieved your comformation email.</div>
but it always displays the "multiple_warning" regardless. How can I get this to behave properly?