copy to clipboard and stay on site

fuzum
Kilo Contributor

Hi everyone,

I hope you guys can help me :S

I made a new UI-Action for the context menu. I need to copy information generated by a JS to the clipboard. I try it by using window.prompt("Copy to clipboard: Ctrl+C, Enter", someGeneratedText);.

My problem is, at first, the promt window doesn't show up. Also I want it to stay at the current page (it always jumps back to the previous page).

Kind Regards

7 REPLIES 7

fuzum
Kilo Contributor

It worked out by using a Ajax call.


I'm glad you got it resolved and happy I could help point you in the right direction.



Can you post the final script(s) here so others looking for the same answer can find them? This way we all learn.


Thamarai
Giga Contributor

copyToClipboard function is not working in the list level (Called in the list choice UI Action- Client callable) in safari browser, where as it's working fine in the form level in safari browser.

Could you please confirm, Is there any limitation in safari? Getting below popup message in safari.

Because of a browser limitation the URL can not be placed directly in the clipboard. Please use Ctrl-C to copy the data and escape to dismiss this dialog