close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Count in a selection box

Thread began 10/25/2012 2:47 pm by john70964 | Last modified 10/29/2012 4:40 pm by john70964 | 1808 views | 16 replies |

john70964

Count in a selection box

Hello
I wish to create a selection box which when a selection is made will indicate how many of that item is available.

I have tried the attached code but it shows only the quantity of the first item and does not update when a further selection is made.

Can anyone please assist me with this please?

Many thanks
John

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

Jason ByrnesWebAssist

you need to submit the selection to get the count for the selected item


you need to submit the selection and create another recordset to return the count, set the recordset to filter by the selection made so that the count is for the selected product.

Sign in to reply to this post

john70964

Quote
"you need to submit the selection to get the count for the selected item".

I can see the need to update the table when outside of the box is selected.
Can you please say how this is achieved?

I see the need to create a second recordset but cannot see how the second recordset is caused to filter by the selection made in the first recordset.

Sign in to reply to this post

Jason ByrnesWebAssist

to submit the form, add a submit button and click it

to filter the recordset, set the filtering options in the recordset dialog box.

this is rather basic Dreamweaver usage.

Sign in to reply to this post

john70964

Thanks Jason
Re "to submit the form, add a submit button and click it" Sorry I misunderstood.

When creating the second recordset as suggested below

"set the recordset to filter by the selection made so that the count is for the selected product."

I cannot see how to do this in the second recordset from the filters allowed in the wizard.
I attached a pic to show my meaning.

Sign in to reply to this post

Jason ByrnesWebAssist

the name of your form variable is Category

so in the filtering, section select the Form variable Filter option and set the name in the box next to the select list to "Category"

you then need to go into advanced view, and add the COUNT() condition to the recordset select.

Sign in to reply to this post

john70964

Thanks Jason
I have used the form variable in the recordset but cannot get a total to show.

I am attaching a pic of the recordset if that helps.

Sign in to reply to this post

Jason ByrnesWebAssist

you need to use an alia on the count :

SELECT Category1, COUNT(Category1) as categoryCount
etc....


then from the bindings panel, use the categoryCount binding on your page.

Sign in to reply to this post

john70964

I think I did as instructed but I cannot get a result in the CategoryCount.

I show my details in the attached image.
Thanks
John

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the page please and a link where i can see the problem.

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