Javascript for server dir fixed