How to dynamically disable a button

How to dynamically disable a button

  
Hi all,

I need to dynamically disable a button (Labeled Next for exemple) depending on the choice made from a set of radio buttons.

Is possible to place some code on the exetended properties of the radio buttons so as to set the enable or disbale flag of the button labelled Next?

Thanking you all in advance.
Do you have any button to press after filling the radio buttons set?

I would use the onclick and a javascript function.

attribute : onclick

value : "DisableButton('"+NextButton.Id+"','"+RadioStatus+"');"

javascript:

function DisableButton(ButtonId,RadioStatus) {

if (RadioStatus=x || RadioStatus=y){ document.getElementById(ButtonId).disabled=true
}

}

I'm quite doubtfull the javascript is in correct syntax, but give it a try...

Best Regards,

Diogo C S Cordeiro :-)
Thanks mate,

it worked fine!

for reference sake, didn't need that much code though

I had two radio buttons, accept or decline, and one next button (whose Name=Next) so...

on the accept radio button extended propeties:
onclick "document.getElementById('wtNext').disabled=false;"
on the decline radio button extended propeties:
onclick "document.getElementById('wtNext').disabled=true;"

Thanks mate .... I hit the wrong reply button :)