I wonder whether someone may be able to help me please.
I’ve put together this page from a tutorial found at ‘w3schools’ which populates a table with user details following selection of their name from a drop down list.
I’d now like to change this a little, and instead of the names being selected from a drop dowm menu, I’d like to have a list of the names on my form with a radio button against each. Then once the radio button is selected, the correct user details are shown in the table.
I’ve done quite a bit of research to try and find an example for this but without any success.
I just wondered whether someone, certainly with more experience than I could perhaps p[lease show me what I need to do to get this to work on my form.
Many thanks
You can use the
clickevent for radio buttons instead ofonChange="showUser(this.value)".EDIT: The same name is used to make sure only one user can be selected.
That’s it.
Comment if something is going wrong.