adjusted for Joomla 3 and JavaScript improved - now working

DS, ...Legacy
JavaScript url in Controller instead of helper file