add script for basePath in ajax request