close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Validation causes duplicate insert

Thread began 3/20/2010 10:57 am by andy.schofield283961 | Last modified 4/16/2010 10:55 am by Jason Byrnes | 1965 views | 15 replies |

andy.schofield283961

Validation causes duplicate insert

I am having a problem where applying the validation toolkit is causing my standard dreamweaver insert behaviour to produce a duplicate record.

If I remove the validation toolkit from the form the form submit then it submits and inserts only a single record as expected.

I have cut the validation down to a single field length requirement on form submit, but still having no joy.

I have attached a copy of the .asp (with .txt extension to allow upload) file.

Can you please advise

Thanks

Andy

Sign in to reply to this post

Jimmy Wu

It doesn't look like the attachment worked. Make sure that the insert server behavior is not called before the validation code goes through. If the insert server behavior is before the validation code, at the top of the page, then it will insert and then the validation code will run and forward to the page and may be inserting again.

Sign in to reply to this post

andy.schofield283961

Pointer please...

Could you see the code I attached, if you could point me to where the validation code begins or what it looks like I'll happily move it, just not sure what to look for and move to.

Any pointers would be great!

Thanks

Andy

Sign in to reply to this post

Jimmy Wu

I don't see an attachment still. Could you try attaching it again? Make sure its a valid attachment file extension.

Sign in to reply to this post

andy.schofield283961

Attachement Added

I have re-added the attachment for you to review.

Thanks again for your help.

A

Attached Files
webassist.zip
Sign in to reply to this post

Jimmy Wu

It appears that you have applied the validations to fire on the on click of the button. This doesn't prevent the form from being submitted, so the form will still submit with the incorrect values. If you change the validations to the onSubmit of the form, then the validation and insert should work correctly.

Basically on line 1363 of the form, you have onClick="<validation code>". You want to copy the <validation code> and put it in the onSubmit of the form on line 729.

Sign in to reply to this post

andy.schofield283961

Still duplicates

Hi thanks for the response, i have tried your suggestion and re-uploaded modified page.

Still getting duplicate insert. Can you help please, i am so near to completing this page and this is my final issue.

Many thanks

A

Attached Files
LogIssue2.zip
Sign in to reply to this post

Ray BorduinWebAssist

That looks correct. Do you have a page where we can view it live and test for ourselves? Have you looked in the error console to be sure there are no javascript errors? I think I would start with that.

Sign in to reply to this post

andy.schofield283961

Sorry I dont have a live server, I have looked all over but cannot stop this from occurring is there anything else you can do to help me on this as I'm really struggling.

Thanks

Andy

Sign in to reply to this post

andy.schofield283961

Helllpppp!!!

I can supply a copy of any page required as well as a copy of the DB if needed, just dont have a website i can direct you to currently.

can you please suggest how I can solve this issue...

Thanks

Andy

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...