The ajax to load the javascript dynamically should use an absolute address otherwise it may fail.