I have a button in HTML page (SAFARI BROWSER), and I need to copy the text in a textbox to the clipboard on clicking that button without using flash.
In my scenario I should not select the text and give copy. Just by clicking the button autocopy should occur. Is that possible? If yes, how?
I used window.clipboardData, but it is returning undefined.
document.execCommand('copy') also wont work.
I have to copy without manually hitting ctrl+c or command+c.