close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Best approach, nested repeats with radio buttons

Thread began 9/28/2009 4:04 pm by dcb286193 | Last modified 9/30/2009 12:50 pm by Eric Mittman | 1785 views | 3 replies |

dcb286193

Best approach, nested repeats with radio buttons

I am trying for figure the best approach for the following: I have a database of furniture. I would like to show all the chairs in one section. Let say I have two different models of chairs in that section, not a problem. I have another database that contains the quantity and price for each model of chair. First chair has 3 price breaks the other has 2. I would like the prices to show as a radio group under each product. So when the radio is selected to the corresponding chair it pushes the price using javascript into the input form relating the that item.

I can do this if it is just one item. I just build the radio group using product price database in a repeat. I am having trouble figuring the best way to handle multiple items in a repeat area, can not have nested repeats. And, building the radio button group dynamically such as the name, etc. Then setting the price when the radio button is selected. Or, should I look into another direction?

Your thoughts are appreciated.

Sign in to reply to this post

Eric Mittman

I think with the end result you are looking for this would be easier to create on a product detail page. On a detail page you could just have the radio group be dynamic and associate the values with a recordset for the prices.

You can then do the javascript to set the value of another form element to the price. For the JavaScript part it should be very basic, it might be just setting the value of an element in the onChange event for the radio group. Here is a link to the W3schools site, it is a great resource for the js stuff:

prop_text_value.asp

Sign in to reply to this post

dcb286193

Best approach, nested repeats with radio buttons

This is how I have it set up right now and it does work. I was just wondering if their was a better solution to how I was doing it now.

Thank you for your reply.

Sign in to reply to this post

Eric Mittman

One way that I have done similar things like this on a single page for multiple items is to put the code for the radio group recordset inside of the loop. This way you can have unique values generated by the recordset each iteration. If the recordset is being filtered to a specific item id you would just want to make sure you update this part of the code to use the dynamic value that comes from the main items recordset.

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