en fait, le probleme vient du fait que firefox et opera ne gere pas le :
window.clipboardData.getData("Text")
Du coup je ne sais pas trop comment m'en sortir.
J'ai vu ce post.
http://www.developpez.net/forums/sho...d.php?t=259841
Apparement la solution serai ce code:
1 2 3 4 5 6 7 8 9 10 11
| <script>
function copy_clip(text) { <!--[if IE]>
window.clipboardData.setData("Text", text);
return; <!--[endif]--> //do Mozilla or Cross-Browser clipboard copy here.
}
</script> |
Si j'ai bien compris on detecte le navigateur et on applique un return???
Mais comment detecter les navigateurs en question?
J'ai trouve ca mais ca me semble un peu lourd, la gestion de chaque navigateur.
http://javascript.developpez.com/faq...vig#navigateur
Voila l'erreur Firefox:
Erreur*: uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://www.expertaevolution.com/index.php?page=telechargement :: copyit :: line 449" data: no]
Une solution magique?
Partager