Everything but the copy button works. I know d_msg is not empty, so thats not a problem. I did not have json_encode before, I tried using that to fix it. I tried switching "focus();" with "window.prompt("Copy to clipboard: Ctrl+C, Enter", t);" to see if it was window.prompt, that had no effect. I tried removing window. to see if just prompt works. I am at a loss on what to try next. I would have posted on stackoverflow but my account got banned from asking questions due to the "community" marking one of my posts as a one time problem. (I did not see the `)