Hi Tariq,

See here:
https://wiki.openmrs.org/x/kg8z#HTMLFormEntryModuleHTMLReference-Javascriptfunctionreference

<obs id="chkbox" ... /> isn't a *real* HTML tag, but it leads to the
creation of one or more html elements. To access the main element you'd need
to do getField("chkbox.value").

-Darius

On Tue, Aug 2, 2011 at 11:13 PM, Muhammad Tariq Khan <[email protected]
> wrote:

> Hi,
>
> I want to enable/disable a combo box based on a check box.
> If I check it, combo box should be disable and if I uncheck it, it would
> get disable.
>
> <htmlform>
>
> <*script* type="text/*javascript*">
>
>    $j(document).ready(function() {
>         window.alert('Hello, world.');
>
> *   $j("#chkbox").click(function(){
>        $j("#cmb").attr('disabled', true);
>
> });
> *
> });
>
> *</script>*
>
> <section headerLabel="Test">
>
>   <obs id="*chkbox*" conceptId="6304" labelText="" answerConceptId="6274"
> answerLabel="Cough"/>
>
>   <obs id="*cmb*" conceptId="1071" labelText="Choose One"
> answerConceptIds="107,5957" answerLabels="Cough, Productive Cough"/>
>
> </section>
>
> <htmlform>
>
> Please guide ...
>
> - Tariq Khan
> ------------------------------
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-implement-l>from
>  OpenMRS Implementers' mailing list

_________________________________________

To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-implement-l" in the  body 
(not the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l]

Reply via email to