complete ajax implementation of location in course form