0

Hello,

I'm displaying information, but I'm trying to figure out how to create a button that says "change details" and in the exact place of the displayed information, there will be input fields where you can change details

ex:

Color : Blue
Size : Large

(link or button for change detail here)

if you click on the link or button to change the detail, those static texts will change into drop down selection forms. I was wondering how to do that?

Thank you

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by AleMonteiro
0

It's quite simple, and you can do it in a lot of ways.

One one is to have an hidden drop down that'll be shown as the user clicks the button, and at the same time you need to hide the label that os appearing.

Another way is to request the drop down data to the server when the user clicks the button and then create the options dynamically.

Another way is to request the entire drop down to the server and just use the innerHTML property to set it.

And then you'll need a button to get the new information and send it to the server, and then change it back to the label only.

Hope it helps.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.