Hi All,

I have a problem...
I'm beginner/newbie on PHP and i wanna know how to disable the form component (ex. List Menu) with onclick in another component (ex. Radio button).
So if i click radio button the list menu will be disable.

Please help me...😕

    Google for: onclick disable forms elements

      moved to clientside technologies.

        There are attributes in html for forms so that you can disable them, e.g.:
        <input name="inputName" id="inputId" type="text" disabled="disabled" value="the text">

        Not all form types have "disabled" as the "disabling" attribute, look at
        http://www.w3schools.com/tags/default.asp and find the attributes for your form types.

        In order to dynamically disable them you could use JavaScript's DOM support, e.g. the above input could be disabled like this:

        document.getElementById('inputId').setAttribute('disabled','disabled');

        and re-enable like:

        document.getElementById('inputId').removeAttribute('disabled);

        You could go different ways doing this depending on your needs.

        Good luck to you.

          You could also just hide it, onclick of the other element.

            Write a Reply...