Lodius2000 Posted October 11, 2008 Share Posted October 11, 2008 Hi, I know zero js but heres what i got, I wanna copy $id to the clipboard and this isnt working, what am i doing wrong, and is this only for 1 browser, do i need a different method for other browsers? <?php $id = "6228"; print "<script type=\"text/javascript\">\n"; print "var id;\n"; print "id=$id;\n"; print "id.execCommand(\"Copy\");"; print "</script>"; ?> thanks Link to comment https://forums.phpfreaks.com/topic/127936-solved-php-and-js-copy-to-clipboard/ Share on other sites More sharing options...
awpti Posted October 11, 2008 Share Posted October 11, 2008 Sounds like a javascript issue. Your PHP is fine. Link to comment https://forums.phpfreaks.com/topic/127936-solved-php-and-js-copy-to-clipboard/#findComment-662472 Share on other sites More sharing options...
Lodius2000 Posted October 11, 2008 Author Share Posted October 11, 2008 will mark as solved and repost in js forum Link to comment https://forums.phpfreaks.com/topic/127936-solved-php-and-js-copy-to-clipboard/#findComment-662481 Share on other sites More sharing options...
Lodius2000 Posted October 11, 2008 Author Share Posted October 11, 2008 heres the link to the new one http://www.phpfreaks.com/forums/index.php/topic,220507.0.html in case you had any ideas Link to comment https://forums.phpfreaks.com/topic/127936-solved-php-and-js-copy-to-clipboard/#findComment-662486 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.