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

Re-populating Lists after form submission

Thread began 3/01/2010 11:16 am by Dooza | Last modified 12/14/2010 7:54 pm by Dani Chankhour | 3212 views | 12 replies |

Dooza

Re-populating Lists after form submission

Hi there,
Hope your all well, its been a while since I popped in, but need some help.

I am using CS3 with ASP. I have 4 dynamic dropdowns which work fine. The form data is submitted to the same page where the results are shown, the only problem is that once the page is loaded the dropdowns are reset. Is there any way to get them to re-populate the lists using the form data?

Cheers,

Steve

Sign in to reply to this post

Dani Chankhour

In Dreamweaver open the Properties window (Window -> Properties). In Design view select the drop down list and then depending if the drop down is dynamic or static, you can click either list values or Dynamic and then make sure to select the drop down list for the "Select value equal to"

Let me know if you have any other questions.

Sign in to reply to this post

Dooza

Really?

Sadly that didn't work, but to be honest I didn't think it would, as the dynamic drop downs are created using an onChange event. When you select the first one it populates the second, and when you select the second it populates the third, and so on.

There are 4 dynamic drop downs in total, but not all are shown, it depends on the data selected. Most of the time its just the first 2, but in rare occasions its all 4.

The dynamic drop downs filter a recordset, but I want to be able to change the filter once the data is shown, so I need the dynamic drop downs to repopulate on page load, is this possible with this extension?

Steve

Sign in to reply to this post

asnw0764437428

re-populate list after submission

I am currently trying to do the same thing within php with not much success. If you suss it can you post on here, thanks.

Sign in to reply to this post

Dooza

Well my solution wasn't easy, and it took several attempts to make a page work as expected.

Here is mine: pricebook.dataset.asp

The form doesn't submit, it has a button that when clicked executes some Javascript. This gets the values from the selected selects, then constructs a querystring, and reloads a Spry dataset. The dataset is from an XML file that is generated from the database. The query used in creating the XML is a stored procedure that takes up 5 parameters.

There is actually 2 XML datasets reloaded, one is for the manufacturer filter. I created some custom code to handle the filter.

I did have to modify the Web Assist code slightly to show/hide the other drop downs. There are up to 4 drop downs available depending on the categories selected.

It wasn't easy this way, but without Web Assist changing or adding some code I couldn't see any other way of this working.

Steve

Sign in to reply to this post

Dani Chankhour

Thanks for your response and the explanation.

I'm just curious, have you tried moving the onchange event of the first drop down list to the onload of the body? I think the trick here is to only move the onchagne of the first list and leave the other onchange events.

Sign in to reply to this post

Dooza

Hi Dani,
I have tried that and nothing happened at all.

I decided to think about it some more, to see how it all works. I first tried a hidden form field and used its ID in the onload, but I got error as it wasn't a select. So I thought I would create a select (later to be hidden by CSS) that only has one option set, the one from the URL querystring. This kinda worked, it populates the lists, but it doesn't show the correct selected one, it only show the first option, which is select a category.

What we need is an additional function that is only used on page load, and sets the selected one as well. It could grab the values from hidden form fields, or directly from the querystring if JS can do that.

Steve

Sign in to reply to this post

Dani Chankhour

I agree with you. Although I think we should be to do it using the Post value of the first drop down list instead of using the javascript.

Sign in to reply to this post

Dooza

Excellent, sounds like we might have a feature request here :)

My only additional requirements would that whatever the solution ends up being, it needs to work with ASP, or at least be easily transposed into an ASP solution.

Thanks for the help Dani!

Steve

Sign in to reply to this post

Lon WintersBeta Tester

Originally Said By: Dooza
  Well my solution wasn't easy, and it took several attempts to make a page work as expected.

Here is mine: pricebook.dataset.asp

The form doesn't submit, it has a button that when clicked executes some Javascript. This gets the values from the selected selects, then constructs a querystring, and reloads a Spry dataset. The dataset is from an XML file that is generated from the database. The query used in creating the XML is a stored procedure that takes up 5 parameters.

There is actually 2 XML datasets reloaded, one is for the manufacturer filter. I created some custom code to handle the filter.

I did have to modify the Web Assist code slightly to show/hide the other drop downs. There are up to 4 drop downs available depending on the categories selected.

It wasn't easy this way, but without Web Assist changing or adding some code I couldn't see any other way of this working.

Steve  



Off Topic, but how are you creating the XML from the DB? Is there an ASP page involved that performs the query and outputs/writes in XML? I've been looking for a solution to this for a while, but I only found PHP solutions.

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