I am trying to encode and decode a textbox control I am using for password collection. A friend of mine gave me the script below, but I cannot get it to work. I have never used javascript before. My text box name is “Password” and I have 2 data labels already set up one for encode and one for decode. But I cannot figure out how to get this to work. Does anyone know?
<script>var rtxt ='Text';
var encodedString = window.btoa( rtxt );
$('span/Name="dl_Encoded"]').SFCLabel('option','text', encodedString);
var rtxt ='Text';
var decodedString = window.atob( encodedString );
$('spanrName="dl_Decoded"]').SFCLabel('option','text', decodedString);
</script>