Add javascript handler for the transfer. Not working yet.