Goto main content

help desk

My Javascript is not working, when I close a statement using }}

I have this javascript here but when I generate the page it is not working.
 

if (reload_summary) ps.widget_ehr_patient_summary.reload_summary({ data: { main_tab, side_tab }});
Posé le 2022-12-06 06:22:00

RÉPONSE OFFICIELLE

When programming javascript please pay attention to the use of "}}".
This is critical because it is also a closing sncode token. It is often very hard to debug.

are reserved syntax for sncode to start and close sncode.

AVOID DOING:

if (reload_summary) ps.widget_ehr_patient_summary.reload_summary({ data: { main_tab, side_tab }});

DO INSTEAD

if (reload_summary) ps.widget_ehr_patient_summary.reload_summary({  data: { main_tab, side_tab }
});

a simple space could also work if you really want to keep everything on one line "} }"

Réponse de:
Etienne Carrier

Répondu le : 2022-12-06 07:29:00