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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to trigger a multi-record update without a button click

Thread began 1/07/2010 6:50 pm by david.barrack304604 | Last modified 1/08/2010 1:42 pm by Jason Byrnes | 1039 views | 6 replies |

david.barrack304604

How to trigger a multi-record update without a button click

I set up a multi-record update and set the behavior to trigger on the page load and then also specified a page to go to after the behavior is triggered. When I did this it did not look like the behavior worked. When I changed the behavior to trigger when a button was clicked everything worked fine. The problem is I don't won't the user to have to see the page and click a button. Some of the issue is that the repeating region just shows a bunch of blank rows with repeating buttons which is something that the user really does not need to see. In short, I need to update many rows with no user intervention. I wish I could just trigger a stored procedure to update the rows prior to a page appearing.

Thanks for any help.

David

Sign in to reply to this post

Jason ByrnesWebAssist

the update probably needs information from the form. you can add a javascript command to the body onLoad event to automaticly submit the form:
<body onLoad="document.formName.submit();">


just change formName to match the name attribute given to the form tag:
<form name="formName".....

Sign in to reply to this post

david.barrack304604

Hi Jason,

The form only has 1 behavior which is the multiple-row update. The update just uses a column from the recordset to do the update. I thought that if I specified "on page load" as the trigger then the multiple-record update would trigger. But for whatever reason I'm having to click on the submit button. I will give the JavaScript suggestion and run. Thanks so much for the quick responses.

Sign in to reply to this post

Jason ByrnesWebAssist

The multiple update behavior uses hidden form elements in the repeat region, those hidden form elements contain the ID numbers of the records to update. without submitting the form, it has no way to know which records you want to update.

Sign in to reply to this post

david.barrack304604

Hi Jason,

Well I'm confused then. Attached are the instructions from WA I followed. On step 7 you bind the database column to an dynamic value in the recordset. I thought that is how the multiple update behavior determines what records to update. In other words, the behavior would update every record returned by the recordset. Is that correct?

The basic problem I have is that I have a page loading with a given recordset defined and I want to use that result set from the recordset to update the database.

Sign in to reply to this post

david.barrack304604

Instructions from multi-update

Attached are the steps I followed for the multiple update. For whatever reason the repeat region appears on the page with just blank fields and a submit button for each row. I just want all of the updates processed, rather than having to click on every button. If it's requiring each button to be clicked then I'm not so sure of the value of the using the server behavior.

Attached Files
da_insert_multiple_records_sr-1.pdf.zip
Sign in to reply to this post

Jason ByrnesWebAssist

If you are seeing more than one button, than you included the button as part of the repeat region. The button should not be added as part of the repeat region, it should be outside the repeat region.


It sounds to me like you are either including the entire form as the repeat region, or the button in the repeat region. Only the fields that should be updated should be included in the repeat region.


The multiple update cannot work directly from a recordset, it is not set up to loop through a recordset, it is set up to loop through a collection of form elements.


Use the javascript onLoad function I suggested before to have the form automatically submit when the page loads

Sign in to reply to this post

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