You have invoked function test on button click. There the initialization of the ZeroClipboard will take place thats why it require second click to activate better initialize ZeroClipboard at on load
window.onload = function MyFunction() {
var sss = "my Name";
var clip = clip = new ZeroClipboard.Client();
clip.setText(sss);
clip.glue('d_clip_button');
}
or use
var clip = clip = new ZeroClipboard.Client();
window.onload = function MyFunction() {
var sss = "my Name";
clip.setText(sss);
clip.glue('d_clip_button');
}
clip.addEventListener('onMouseDown', function (client) {
});