Getting value from dataelement/indicator

Dear all,

Can someone please help me on a script doing the following:

I have a form with data Elements that must be filled with values according to values entered in another data elements before submitting the form. How do I get values from this data Elements/Indicators on the form in order to perform operations? May someone has any JavaScript just performing similar?

Regards

Joao