A: 

I think i did find a solution. It's a bit weird, but hey, it's for IE. It's a modified snippet I found on stackoverflow.

<body>
    <a href="#" onclick='test("This\nIS\nA\nTEST")'>TEST</a>
    <div id="cb" style="position: absolute; left: -2000px"></div>
</body>
<script>

function test(cText) {
    cText= cText.replace(/\n\r?/g, "<br>");

    // create an editable DIV and append the HTML content you want copied
    var editableDiv = document.getElementById("cb");
    with (editableDiv) {
        contentEditable = true;
    }     
    editableDiv.innerHTML= cText;          

    // select the editable content and copy it to the clipboard
    var r = document.body.createTextRange();
    r.moveToElementText(editableDiv);
    r.select();  
    r.execCommand("Copy");

    // deselect, so the browser doesn't leave the element visibly selected
    r.moveToElementText(document.body);
    r.select();
}

</script>
Dietrich Raisin
A: 

I would suggest using some other method than the clipboard for sending data to the user. This method only works in IE and can be disabled (and newer IE versions prompt first): http://stackoverflow.com/questions/767105/get-clipboard-data-as-array-in-javascript

A CSS popup box (which the user can copy from themselves) would probably be a nicer (and cross-platform) solution. This might help: http://www.pat-burt.com/web-development/how-to-do-a-css-popup-without-opening-a-new-window/

kanaka
OK, thanks to all. I think I will go the CSS popup route. I agree, a cleaner solution.
user478094, how about selecting an answer so your question is marked as resolved? Thx
kanaka