Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

DOM alternative

pswapnil320
Tera Contributor

Can anyone suggest replacement functions for DOM manipulation technique (e.g. gel, document) in Client script.

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }
     g_form.getReference('u_source_cost_center', applyCostCenterStyle);

    function applyCostCenterStyle(cost_center) {
        if (cost_center.u_active == 'true')
            return;
        try {
            var elementID = gel('sys_display.' + g_form.getTableName() + '.' + 'u_source_cost_center');
            elementID.style.color = "red";
        } catch (ex) {}
    }
}

 

0 REPLIES 0