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

dynamic add-to dropdown

Thread began 7/06/2010 4:16 pm by rick178787 | Last modified 7/08/2010 7:10 am by rick178787 | 725 views | 6 replies |

rick178787

dynamic add-to dropdown

I have several tables where, particularly in the beginning, users may not find the correct LABEL in a dataset and need to add it. These dropdowns are part of a larger form.

In Developer Toolbox we had a little server behavior we'd apply to a predefined dropdown generated from a RS that would allow a user to type and add an item to the dropdown list and then reload the list for selection and insert/update.

I'm thinking I could do something with WA triggers, but I can't find a way to call them if I've used a simple DA Wizard form. Am I just missing the insert trigger? The understanding triggers pdf doesn't address how to access them independent of a larger tool, like eCart.

Should I just move on to JQuery instead and save some time? You'd think that this is the kind of little server behavior people would use all the time.

Sign in to reply to this post

Eric Mittman

I'm not sure that I understand what type of instruction you are looking for. Triggers are just used by the server behaviors for determining when to execute the code for that server behavior. So if you have a special trigger for the insert then only when that triggers conditions are met will the insert occur. In this context what would you like the trigger to do for you?

If you are looking to add in functionality on change of a select list this would be a client side behavior, not a server behavior. You should be able to select the element and go to Tag > behaviors to set an action for the event of that form field. You will not be able to trigger server behaviors directly like this though.

Sign in to reply to this post

rick178787

I'm trying to do this:

basic.php


add an item to a dropdown on the fly.

Sign in to reply to this post

Eric Mittman

The page you linked to uses client side jquery to achieve this result. This is not something that you will be able to configure using any server side triggers by themselves. If you had the form submitted with some client side js you could use the values that are submitted with the form to trigger a particular server behavior, then have the page redirect back to itself after the record has been added. Since the list is drawn dynamically you should only need to insert the record and reload the page to see the change take place.

Sign in to reply to this post

rick178787

Well, groups like WA and Interakt have been blurring the meaning of SB for a long time now. But you are right, it is a client side / server side combo widget. What should I call it?

What I should have said is that the Interakt/DTB widget was applied through the SB flyout in the Database window/SB tab. Still it was quite useful (and fast to apply).

So really there's no quick way to do what I want with WA and I'd be better off picking up the JQuery?

Sign in to reply to this post

Eric Mittman

There is no single behavior that you can make use of in the WA tools that would do this for you. It would require you to use client side scripting to submit the form onchange of the menu. Then use the posted values to trigger the server behavior that will insert or update the record, then redirect back to the page.

It is really the functionality of an insert or update server behavior that you need, you would just like to trigger it based on a client side event rather than the typical form submission. Other than submitting the form with the client side js it is the same as a standard insert or update server behavior.

Sign in to reply to this post

rick178787

Sorry to bother you.

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