There is a nice javascript el gamal encryption library.
https://github.com/benadida/jscrypto.git
We should use this library to make sure the vote is send
to the server only once it has been encrypted.
Helios has a python implementation that should be of inspiration
https://github.com/benadida/uclvoting/blob/master/static/helios.js