← Back to team overview

dhis2-devs team mailing list archive

Re: How can i access 'form.js' from my data entry screen?

 

Where have you placed the file form.js?

I think you could try to include the function directly in the custom form,
not in a separate file.

Knut

On Sun, Sep 6, 2015 at 8:35 AM, Julhas Sujan <julhaspustcse@xxxxxxxxx>
wrote:

> Hi Expert's,
>
> I am trying to access a function in 'form.js' from my data entry screen as:
>
> In form.js:
> function openingBalanceData(){
> var dataSetId = dhis2.de.currentDataSetId;
> console.log(dataSetId);
> dhis2.de.currentOrganisationUnitId = selection.getSelected()[0];
> console.log(dhis2.de.currentOrganisationUnitId);
> var a=10;
> console.log(a);
> }
>
> In my data entry screen:
>
> ------------------------------------------------------------------------------------------
> <script>
> window.openingBalanceData();
> </script>
>
> ------------------------------------------------------------------------------------------
> What is the problem in my script or can i not call from data entry screen?
>
> Waiting for your valuable opinion.
>
> Thanks
> Julhas
> Dhaka, Bangladesh
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org

Follow ups

References