<div dir="ltr"><div><div><div><div><div>Hi Andreotti,<br><br></div>Here i solve the problem like that :<br><br>calling a new window :<br> <i><b> function CopytoClipboard(text)<br> {<br> window.open("./CopyToClipboard.html?text="+text,'','width=0px,height=0px');<br> }</b></i><br><br><br></div>And in this blank window :<br><br><i><b><html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"><br><head><br> <script><br> function CopyToClipboard()<br> {<br> var text = location.search.substring(6, location.search.length).replace(/%20/g, " ");<br> var copyDiv = document.createElement('div');<br> copyDiv.contentEditable = true;<br> document.body.appendChild(copyDiv);<br> copyDiv.innerHTML = text;<br> copyDiv.unselectable = "off";<br> copyDiv.focus();<br> document.execCommand('SelectAll');<br> document.execCommand("Copy", false, null);<br> document.body.removeChild(copyDiv);<br> window.close();<br> }<br> </script><br></head><br><body onload="CopyToClipboard()"><br> </body></b></i><br></div><i><b></html></b></i><br><br><br></div>I hope it will help you ;)<br><br></div>Duck.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-02 21:53 GMT+02:00 Mauricio Villablanca <span dir="ltr"><<a href="mailto:mgvillablanca@yahoo.com" target="_blank">mgvillablanca@yahoo.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's not possible to copy text to the clipboard using javascript. It can be<br>
done in Flash though.<br>
<br>
You might to want create a SWF control in a hidden frame of the Mapguide web<br>
layout and pass the text you want to copy to the clipboard as parameter.<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Copy-coordinates-to-clipboard-tp5205969p5208742.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Copy-coordinates-to-clipboard-tp5205969p5208742.html</a><br>
Sent from the MapGuide Users mailing list archive at Nabble.com.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
mapguide-users mailing list<br>
<a href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
</div></div></blockquote></div><br></div>