Have you enabled the JavaScript code management ? If you have not enabled it, you can go to your ACP(Admin Control Panel) > Modules > HTML & JAVASCRIPT > Javascript codes management > Javascript codes management > Enable Javascript code management : Yes