Added ajax endpoint for getting parties and range states refs #1872