• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Textbox value based on menu list selected value

New Here ,
May 04, 2011 May 04, 2011

Copy link to clipboard

Copied

Hi experts,

i am wodering what is the best way to have a textbox assigned a value based on a listmenu selected value.

i have the following tables

ID / item / color / price

1 / item1 / red / 5$

2 /item2/ green / 2$

.

.

.

.

10/item10/purple/10$

i have a listmenuwith all items listed.

and i have 2 other textboxes that should get the color and prices respectiveley..

How can i do that. ?

thanks

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 09, 2011 May 09, 2011

Copy link to clipboard

Copied

Hi,

Lots of potential options.

1).  Keep it simple.  Put the information all in the one text box, just like you have it on the posting:  Men's Polo Shirt - XL - Red - $29.99.

2).  If you have the same item with lots of colors, navigate them to the Men's Polo Shirt page, then you only need XL - Red - $29.99.

3).  If you only have a few options and they're going to be fairly static, a javascript script would do a very nice job.

4).  If you have a lot of items, I'd suggest using a query to populate the initial select box, then use the "bind" function via a cfc to populate the other two boxes.  You'd simply put the ID in the sql WHERE clause as ARGUMENTS.ID then return the fields you need.

select ....

from ...

where ...ID = ARGUMENTS.ID

<cfwild />

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2011 May 09, 2011

Copy link to clipboard

Copied

LATEST

Thank you for your help.

Sent from my iPhone

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation