Forums

This topic is locked

PURE ASP UPLOAD - How can I validate a form as wel

Posted 09 Mar 2003 17:58:38
1
has voted
09 Mar 2003 17:58:38 Joanna McLoughlin posted:
Hi

When I choose the standard Form Validation (to make sure 2 fields aren't empty) along with the Pure ASP Upload, the form is checked, but even if the fields are empty, after bringing up the alert it tries to submit the form, hence I get an error page, stating that the fields must not be blank.

How can I make sure the page doesn't post if these fields are empty?

Also - Is it possible to choose not to upload a new file and change the image path in the database e.g. for record updates, which only require an update to a text field, but the image should remain the same.

A quick response would be great!
Thanks

Replies

Replied 10 Mar 2003 09:48:59
10 Mar 2003 09:48:59 Patrick Woldberg replied:
Be sure that the validation behavior comes before the fileupload behavior.

If no file is selected in an update form, the database will keep the old value.

--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
Replied 31 May 2003 08:40:03
31 May 2003 08:40:03 Alan Chua replied:
Somebody please help.

I have a form where there are 5 fields including one file field.

When I apply both form validation behavior and preasp file upload extension validation, it doesn't seems to work.

Now, when I enter an invalid file extension, it gives me an error, but when it (form validation) checks the rest of the required field when all are in place, the form is submitted to the database and as well as the invalid fie type being uploaded.

How can I stop the process when both criteria are not meet?

I am using Ud4 as the development tool.

I hope someone could help me.

Thanks

Lonetree
Replied 06 Jun 2003 12:47:37
06 Jun 2003 12:47:37 Patrick Woldberg replied:
What is the code that is inserted in the onsubmit from the form?

Should be something like:

onSubmit="MM_validateForm('textfield','','RisEmail');checkFileUpload(this,'',true,'','','','','','','');return document.MM_returnValue"

--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
Replied 02 Jul 2003 23:04:19
02 Jul 2003 23:04:19 Claire Moylan replied:
I also have a form that will have other fields besides the upload fields. Can I put two form actions in place, one for the php upload and another for the other fields? Anyone have examples?

Reply to this topic