the logic as outlined in the attached file is working however I would like to move the inline script (line 8 to 354) into an external js file. only how ?
if I move the above to dtree.js, adjust function dTree(objName) for function dTree(objName, path) and adjust $path for path under icons and use
$jsfile = $baselink.$this->template.‘/js/dtree.js’;
<script type=“text/javascript” src=“$jsfile”></script>
how am I to pass $path to the script?
I am sorry if this is majorly basic but I’m only starting with learning js
could somebody please help me figure how to achieve that?