TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Antony Clinton
NA
34
3.4k
Copy to Clipboard Functionality
Sep 20 2017 11:09 AM
I tried a Copy to Clipboard fuctionality using a Javascript. It is working in IE but not in Google Chrome. Below were my code
<script type="text/javascript" language="javascript">
function copy(strc) {
var controlValue =strc;
if (window.clipboardData) { // Internet Explorer
console.log("show");
window.clipboardData.setData("Text", controlValue);
}
else{
var aux =strc;
//aux.setAttribute("value", document.getElementById(elementId).innerHTML);
document.body.appendChild(aux);
aux.select();
document.execCommand("copy");
document.body.removeChild(aux);
}
//window.clipboardData.setData('Text', controlValue);
}
</script>
Kindly, help me how to achieve this in Chrome
Reply
Answers (
1
)
Values Not being passed Correctly
Windows Form Screen frozing while calling Db.