Adding first js function

Adding first js function to send websockets