change vote javascript to output success message