Hello. It can be done using javascript/ajax, but if you are wanting for the copy to show up on the page it may be easier just to refresh the page as you will have to copy a lot of items back and forth. To send the actual copy command you need to send the information required for the copy command to a php script as a get query in the link you request through ajax. eg something like.....
if (window.XMLHttpRequest) { // code for Mozilla, etc.
xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=succFunction;
xmlhttp.open("GET","http://localhost/copy.php?table=blah&items=1,2,3,6",true);
xmlhttp.send(null);
} else if (window.ActiveXObject) { // code for IE
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
if (xmlhttp) {
xmlhttp.onreadystatechange=succFunction;
xmlhttp.open("GET","http://localhost/copy.php?table=blah&items=1,2,3,6",true);
xmlhttp.send();
}
}
Hope that helps.
Cheers.