off the top of my head... try an onfocus="this.blur();" in the file
input field.  of course, that'll only work if JS is enabled in the
browser.

On Wed, Jun 11, 2008 at 6:12 AM, Robert Harrison
<[EMAIL PROTECTED]> wrote:
> Here's an interesting problem for which I have no solution. Using CFFORM
> enctype="multipart/form-data" to allow upload of a file. The file upload is
> OPTIONAL, so it's either blank or has a file. That's no problem.
>
> However, if the user types something into the file field, the submit button
> just stops working. No error message at all. Just a dead form.
>
> I can't find any validation routine for CFFILE, nor can I find any suitable
> java script.
>
> HOW CAN I EITHER PREVENT THE USER FROM TYPING IN THE CFFILE FIELD (Browse
> button only), OR GIVE THEM A MESSAGE WHEN THERE IS AN INCORRECT VALUE IN THE
> FIELD. ANY THOUGHTS????
>
> Sample code below:
>
>
> <cfform name="form" action="postmsg2.cfm" enctype="multipart/form-data"
> method="post" ScriptSrc="_scripts/cfform.js">
>
>        <cfinput type="text" name="message" required="yes" message="Please
> enter a message." >
>
>        <cfinput type="file" name="file" enctype="multipart/form-data">
> (OFFENDING FIELD, TYPED VALUE KILLS POST)
>
> <input type="submit" name="update" value="Post Message" style="margin-right:
> 8px;">
> </cfform>
>
>
> Robert B. Harrison
> Director of Interactive services
> Austin & Williams
> 125 Kennedy Drive, Suite 100 Hauppauge NY 11788
> T : 631.231.6600 Ext. 119
> F : 631.434.7022
> www.austin-williams.com
>
> Great advertising can't be either/or... It must be &.
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307254
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to