Forum Moderators: coopster

Message Too Old, No Replies

how to prevent a 'Confirm File Upload'

on a form submit

         

lorax

10:30 pm on Aug 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have form that I use both for uploading images and text as well as editing the text and image file name. The form simply loads the image in a dir and then plunks text in a mysql table.

The text part works fine - the image part does too but if I'm in edit mode I convert the Server path to the file into just the file name and paste that into the image file name input. I'm using it more as a reminder to the user of what file they've uploaded.

The problem is that if they don't change the file then the "Confirm File Upload" warning pops up. The script is written to ignore the field if it isn't changed. How can I get around this error?

vincevincevince

10:58 pm on Aug 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This seems like a javascript solution needed?

lorax

12:48 am on Aug 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Probably but I'm not sure what I should do. Clear the input on form.submit();?

vincevincevince

8:41 am on Aug 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yes, either clear it on submit, or have a hidden file upload box, and leave the existing one as a dummy - then only fill in the hidden box onChange for the dummy box.

alternatively - output in plain text the path of the file that is currently uploaded, possibly with [Delete][Rename] or similar options, and then (have a blank uploading box below¦¦have a [Change] button)

lorax

1:49 pm on Aug 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



DOH! That second answer is the one. Plain as the nose on my face. Thanks vvv.