onChange script error: TypeError: $$ is not a function function() { [native code] }

Hari1
Mega Sage

Hi,

I have created a client script - OnChange, which is used to hide the embedded list it is not working i see an error stating $$ is not a function function() { [native code] }. I have unchecked the isolated script as well. But still it is not working. Any help is much appreciated.

 

Below the script:

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === '') {
        return;
    }
	var type = g_form.getValue("case_type");
	alert(type);

    if (type == "obv") {
		
        var list = $$('div[tab_caption="abc"]');
		
		alert(list);
		
        if (list.hasClassName('embedded')) {
            list.hide();
        }
    } 
}

 

Thanks.

2 REPLIES 2

Unique45
Mega Sage

Hello @Hari1 ,

What is the scope of the client script? 

Please mark correct/helpful if this helps you!

custom scope