x_maras Posted October 2, 2009 Share Posted October 2, 2009 Hi, I have a table with two cells in each raw, in the first cells some content and in the second a button showing some charts. I want to make a button, so someone can copy the whole content into clip board. I thought to place an id to each cell and then copy the content of the cells... There is where I need some help. I found some javascript functions, but not working right for me. Any help would be appreciated Quote Link to comment Share on other sites More sharing options...
johnsmith153 Posted October 9, 2009 Share Posted October 9, 2009 for the table, instead of putting: <td>Hello</td> do: <td><div id="helloId">Hello</div></td> <script> function getData() { alert(document.getElementById('helloId').innerHTML); } </script> call the function to show the data held inside the div Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.