<za*****@gmail.comwrote in message
news:11**********************@s34g2000cwa.googlegr oups.com...
Hello,
I have a search function that is reading companies from a database via
ASP and spitting out the results. I have various fields of each company
in variables and I want to be able to create a link that uses
Javascript to copy the address to the clipboard.
I know there is the javascript:window.clipboardData.getData(), but I
can't get to parse the ASP variable through. Does anyone know how I can
do this.
To copy "to the clipboard" use "setData()" not "getData()".
Will this help?
<html>
<head>
<title>Clipper.asp</title>
<script type="text/javascript">
function clipper() {
var data = document.getElementById("Data").value;
alert("Clipboard = \n\n" + data);
window.clipboardData.setData("Text", data);
}
</script>
</head>
<body>
<span id="Data" value="<%=Now%>"></span>
To place the current date and time in the clipboard
<a href="javascript
:clipper()">click here</a>.
</body>
</html>