close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Two delete buttons for two different tables on the same page

Thread began 3/24/2017 7:51 am by iain331081 | Last modified 3/27/2017 11:13 am by Ray Borduin | 1363 views | 9 replies |

iain331081

Two delete buttons for two different tables on the same page

I have a page with two delete buttons to delete records from two different table son the same page.

With just either of them, they both seem to work.

But with both on delete forms on the page, one of them stops working.

I have attached the page below - hopefully its something simple. (I've checked the submit name and Ids are correct, which they look like they are.)

Thanks.

Sign in to reply to this post

Ray BorduinWebAssist

both delete forms use the same ID for the hidden form element:

WADADeleteRecordID

You would have to make that unique by renaming it in one of the forms and then updating the references to it in the script where applicable.

1) In the server behavior
2) in the script when the delete button is pressed
3) in the hidden form element itself

Sign in to reply to this post
Did this help? Tips are appreciated...

iain331081

Thanks Ray - I had only changed those in the form element.

Can you remind me how to add the WA delete record server behaviour? Since things went a bit funny with DW ages ago I do most stuff manually if I can. Which isn't ideal but I've had so many issues with the later versions of DW.

I've just reinstalled the DataBridge extension, and am looking in the server behaviours window, but when I click the add, there are no WA options. There's a separate WA menu, but don't think its in there?

Sign in to reply to this post

Ray BorduinWebAssist

It will be in the Server Behaviors window not in the main menu.

You could also just replace the form element references manually.

If you do a Find on that form element name it will appear 10 times on the page... 5 for each delete. You just have to update the correct 5 that refer to one of the deletes and leave the others as they are.

Sign in to reply to this post
Did this help? Tips are appreciated...

iain331081

I've made those changes now, but still doing odd things with the delete element one - seems to be deleting a day.

Can you have a quick look to see if it looks OK on the attached page?

Sign in to reply to this post

iain331081

Or did I need to change the references in the server behaviour as well?

I only see behaviours 'Dynamic Text Field (WADADeleteRecordID)', but can't see how I change it. If I double click it, it brings up a box, but that is greyed out, and I can only change its dynamic value.

Sign in to reply to this post

Ray BorduinWebAssist

It looks like the popup window also has to be renamed to be unique. They are both named "deleteMessage".

Try updating the references to 'deleteMessage' on lines 616,621, and 626 to 'deleteDayMessage'

Sign in to reply to this post
Did this help? Tips are appreciated...

iain331081

Thanks Ray - also needed to make WADADeleteRecordName unique for each as well, but its working now.

One last little thing - the cancel button on in the pop up works for the delete element, but is giving an error when I cancel the delete day from the pop up.

Its not a deal breaker, as its fine with a link back to the page instead, but if you can spot anything obvious it probably would be better to just close the pop up rather than reload the page.

Sign in to reply to this post

Ray BorduinWebAssist

That cancel button is type="submit" it should be type="button". I think that is the only problem with it.

Sign in to reply to this post
Did this help? Tips are appreciated...

iain331081

Thanks Ray - that fixed it. Not sure how or when or why I would have changed that. (Might have been to do with some CSS for the text on the button.)

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...