Custom.js on custom/modules/mymodule/js/custom.js not starts

document.ready on the custom.js not working, Testing a Hello World but nothing shown

$( document ).ready(function() {
console.log(“hello world”);
$(’#status’).attr(‘disabled’,true);
document.getElementById (“status”).disabled=true;
});

How have you added the JS File ?

Hi, thanks, I put it on the metadata editviewdefs
so:
‘includes’ =>
array (
0 =>
array (
‘file’ => ‘custom/modules/act_Reclamaciones/js/edit_view_code.js’,
),
),

Did you run Admin -> Repair/rebuild after that?

yes repair was done and cleaned the browser cache as well

Can someone hekp with this issue?

what is the path of your editviewdefs? Make sure you are adding it in the right file. There can be two files for your Custom Module, due to studio changes, one in the core modules folder and the other at
custom/modules/act_Reclamaciones/metadata/editviewdefs.php

custom folder one will get preference and will be considered for display.

I put my include on this one
custom/modules/act_Reclamaciones/metadata/editviewdefs.php

Do you see any error in Console? If you check the page source, do you see your file included?
Can you share screenshot of where you are looking ?

1 Like

was included:

I will try to create another custom.js with only document ready and an alert…

Sorry, sorry , was my fault…!
I was modifying programs in a local version and testing the remote operational version.
You really guide me to discover it with your questions… really thanks to you man!!! All done!!