Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Access Denied in IE 6 using HTTPS and File Upload

Reply
Thread Tools

Access Denied in IE 6 using HTTPS and File Upload

 
 
DA
Guest
Posts: n/a
 
      11-30-2004
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>
 
Reply With Quote
 
 
 
 
Steve van Dongen
Guest
Posts: n/a
 
      11-30-2004
DA <(E-Mail Removed)> wrote:

>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.


Don't submit the form using script. Submit using a submit button and
do the validation in an onSubmit handler.

><form name="myForm" enctype="multipart/form-data"
> action="index.cfm?Action=PhotoUpload" method="post">


<form ... onsubmit="return validateForm(this)">

> <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()" />


<input type="submit" value="Send Now" />

></form>
>
><script language="JavaScript">
><!--


<!-- comment is unnecessary

function validateForm(form)
{
if (!form.upFile.value.length)
{
alert("Please select a file to upload.");
return false;
}
if (!form.description.value.length)
{
alert("Description is required for accessibility.");
return false;
}

return true;
}

Regards,
Steve
 
Reply With Quote
 
 
 
 
DA
Guest
Posts: n/a
 
      11-30-2004
Thanks, Steve -- it worked like a charm.

Much appreciated!

-DA

Steve van Dongen wrote:
> DA <(E-Mail Removed)> wrote:
>
>
>>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.

>
>
> Don't submit the form using script. Submit using a submit button and
> do the validation in an onSubmit handler.
>
>
>><form name="myForm" enctype="multipart/form-data"
>> action="index.cfm?Action=PhotoUpload" method="post">

>
>
> <form ... onsubmit="return validateForm(this)">
>
>> <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()" />

>
>
> <input type="submit" value="Send Now" />
>
>></form>
>>
>><script language="JavaScript">
>><!--

>
>
> <!-- comment is unnecessary
>
> function validateForm(form)
> {
> if (!form.upFile.value.length)
> {
> alert("Please select a file to upload.");
> return false;
> }
> if (!form.description.value.length)
> {
> alert("Description is required for accessibility.");
> return false;
> }
>
> return true;
> }
>
> Regards,
> Steve

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Encrypted file upload using the FileUpload control and HTTPS jpandviv ASP .Net 1 09-13-2007 04:24 PM
Upload ZIP file to an HTTPS website (Secure File Transport) using .NET tom ASP .Net 0 11-17-2006 08:18 PM
access denied error for file upload =?Utf-8?B?aWdvdHlvdXJkb3RuZXQ=?= ASP .Net 1 09-29-2006 03:42 AM
403 Forbidden: You were denied access because: Access denied by access control list Southern Kiwi NZ Computing 6 03-19-2006 05:19 AM
Cross-Frame Scripting, IFRAME and https (access denied) Cindy Lee Javascript 1 05-07-2004 06:18 PM



Advertisments