← Back to team overview

dhis2-devs team mailing list archive

Customize form (DataSet)

 

Dear All, 
I have the problem in DHIS2 about the customize data entry form (Data set).You can see my problem in this attached image.Here is my html and javaScript code:
<SCRIPT Language="JavaScript" type="text/JavaScript">
<!--//
function detectedUR(){

  if (document.getElementById("xe5C8vEmEeO-lmbxvugTvKr-val").value<0.2){
    document.getElementById("xn4AKvXaYU7-lmbxvugTvKr-val").value=4000;
    //document.getElementById("tariffID").value =4000;
  }
  else if (document.getElementById("xe5C8vEmEeO-lmbxvugTvKr-val").value>=0.2 && document.getElementById("xe5C8vEmEeO-lmbxvugTvKr-val").value<0.5){
    document.getElementById("xn4AKvXaYU7-lmbxvugTvKr-val").value=6000;
    //document.getElementById("tariffID").value =4000;
  }
  else{
  document.getElementById("xn4AKvXaYU7-lmbxvugTvKr-val").value=10000;
   } 
 }
  </script>


<p>UR:<input id="xe5C8vEmEeO-lmbxvugTvKr-val" title="xe5C8vEmEeO - RBF UR - lmbxvugTvKr - (default) - int" value="[ RBF UR (default) ]" onkeyup="detectedUR()"/>&nbsp;</p>

<table border="1" cellpadding="1" cellspacing="1" style="width: 100%;">
    <tbody>
        <tr>
            <td>Data elements</td>
            <td>Values</td>
            <td>Tariff</td>
        </tr>
        <tr>
            <td>OPD under 5 years</td>
            <td><input disabled id="DdKOnhFMfp3-hBDz7ATMh9d-val" title="DdKOnhFMfp3 - RBF - OPD curative care children &lt;5 years - hBDz7ATMh9d - (Internal verification) - int" value="[ RBF - OPD curative care children &lt;5 years (Internal verification) ]" /></td>
            <td><input id="xn4AKvXaYU7-lmbxvugTvKr-val" title="xn4AKvXaYU7 - RBF tariff OPD - lmbxvugTvKr - (default) - int" value="[ RBF tariff OPD (default) ]" /></td>
        </tr>
    </tbody>
</table>
 Please give me a hand???

(._.)
Viengthong CHONGWAXIONG
Software Developer (Java technology)
Tel: +85620 91132319
Email: v.chongwaxiong@xxxxxxxxx/gerxiong@xxxxxxxxxxxxxxx
GIXON Team

Attachment: Request1.png
Description: PNG image