>Hello,
>
[quoted text clipped - 5 lines]
>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 />
[quoted text clipped - 5 lines]
> <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
DA - 30 Nov 2004 20:32 GMT
Thanks, Steve -- it worked like a charm.
Much appreciated!
-DA
>>Hello,
>>
[quoted text clipped - 51 lines]
> Regards,
> Steve