D
DA
Hello,
I'm hoping someone can help me here. I've got a form that when placed on
a server running HTTPS, I get an "access denied" error in IE 6 (non-SP2
and SP-2) when a user tries to upload an image using a file upload form
control.
I read something about the onClick() event handler causing it, but I've
yet to see a fix or workaround for this. I've posted the form and
JavaScript below.
Thanks for any help anyone can provide,
-DA
<form name="myForm" enctype="multipart/form-data"
action="index.cfm?Action=PhotoUpload" method="post">
<label for="taDescription">Description:</label>
<br />
<textarea id="taDescription" name="description"></textarea>
<p />
<label for="fuFile">Photo to upload:</label>
<br />
<input id="fuFile" name="upFile" type="file" />
<br />
<input type="button" value="Send Now" onClick="submitForm()" />
</form>
<script language="JavaScript">
<!--
function submitForm()
{
if (!document.myForm.upFile.value.length)
{
alert("Please select a file to upload.");
return false;
}
if (!document.myForm.description.value.length)
{
alert("Description is required for accessibility.");
return false;
}
document.myForm.submit();
}
// -->
</script>
I'm hoping someone can help me here. I've got a form that when placed on
a server running HTTPS, I get an "access denied" error in IE 6 (non-SP2
and SP-2) when a user tries to upload an image using a file upload form
control.
I read something about the onClick() event handler causing it, but I've
yet to see a fix or workaround for this. I've posted the form and
JavaScript below.
Thanks for any help anyone can provide,
-DA
<form name="myForm" enctype="multipart/form-data"
action="index.cfm?Action=PhotoUpload" method="post">
<label for="taDescription">Description:</label>
<br />
<textarea id="taDescription" name="description"></textarea>
<p />
<label for="fuFile">Photo to upload:</label>
<br />
<input id="fuFile" name="upFile" type="file" />
<br />
<input type="button" value="Send Now" onClick="submitForm()" />
</form>
<script language="JavaScript">
<!--
function submitForm()
{
if (!document.myForm.upFile.value.length)
{
alert("Please select a file to upload.");
return false;
}
if (!document.myForm.description.value.length)
{
alert("Description is required for accessibility.");
return false;
}
document.myForm.submit();
}
// -->
</script>