Encode URL through JavaScript

Encrypt sensitive SQL information in java