Copy to clipboard issue
So I'm using the following formula as a Copy Content button:
var text CB= URLEncode([SFY PO Number] & " - " & [HO Last Name] & " - " & [HO Street Address] & " - " & [Client Company Name]);
var text Alert= URLEncode("Current Job Info" & " was Copied to the Clipboard");
"<a class='Vibrant Success' style=\"border:0px solid green; background-color:green; text-align: center;-box-shadow: 0px 10px 13px -7px #000000, 9px 7px 12px 6px #000000; \nbox-shadow: 0px 10px 13px -7px #000000, 9px 7px 12px 6px #000000;\"href=" &
"javascript:{" &
"navigator.clipboard.writeText('" & $CB & "').then(function(){" &
"},function(){" &
"});" &
//"alert('" & $Alert & "');" &
"$.jGrowl('" & $Alert & "');" &
"};" &
">Copy to the Clipboard</a>"
So here's the issue: Anytime that there is an apostrophe in one of the fields (For example, [HO Street Address]= 2300 Henry's Drive) then the button refuses to work. Are there any edits I can make to the formula to ignore any future apostrophes?
------------------------------
RJ Ilg
------------------------------