Encode Password Decode Password Using Data Lables

  • 23 February 2023
  • 0 replies


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 ); 

$('span[Name="dl_Decoded"]').SFCLabel('option','text', decodedString);


0 replies

Be the first to reply!