Using Radio Buttons

 

7 points

 

Introduction

In this app, you use radio buttons to give the user a choice of which image to display in an Image box. The user makes a choice by clicking a radio button and then a button.

If one of the radio buttons is named 'radio1', you can get detect if this button has been selected using this code:

if (getChecked("radio1"))

If the Image box is named "imgAlbum" and the image you want to display is "sgtPepper.png", you can display the image using this code:

setImageURL("imgAlbum", "sgtPepper.png");

 

 

Video

The video shows what a completed app should do.