# Can somebody tell me wth's wrong wit ma code?

**URL:** <https://forum.kirupa.com/t/can-somebody-tell-me-wths-wrong-wit-ma-code/222014>\
**Category:** Uncategorized\
**Created:** [April 10, 2007, 5:12am UTC](https://forum.kirupa.com/t/can-somebody-tell-me-wths-wrong-wit-ma-code/222014 "2007-04-10T05:12:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hellboy1](https://avatars.discourse-cdn.com/v4/letter/h/ecb155/32.png) [@hellboy1](https://forum.kirupa.com/u/hellboy1)\
**Post date:** [April 10, 2007, 5:12am UTC](https://forum.kirupa.com/t/can-somebody-tell-me-wths-wrong-wit-ma-code/222014/1 "2007-04-10T05:12:01Z")

</div>

m using 6 radioButtons, the user selects one and after clickin’ d submmit button he gets either d “congratulations” or “sorry” message printed from a label.

Now one of d radioButtons holds d rite answer which radioButton3 (Gall Blender).

After d user has taken d quizz i want all d components 2 b disabled.

But ma code it’s not workin’ :hair:

```php
for (var i=1;i<=6;++i) {
    this["r"+i].onRelease = function() {
        
        var selectedRadioButton = myAdjective.selection;  
        var selectedRadioButtonLabel = selectedRadioButton;
        
        if(selectedRadioButton == " Gall Bladder"){
            statusMessage.text = "Congratulations";
            }else{
                statusMessage.text = "Sorry";    
            }
        for (var j=1;j<=7;++j) {
            this._parent["r"+j].enabled = false;
           }
      }
}

```
