Add a download button in the new window [closed]

I am trying to add a download button in the new window, that should download a contents. Below is the sample html code for that. Can anyone help me? I have added a download button. But not sure how to add script and where to add it?

<table border=1>
<th>  </th> 
<th> sub_domain </th> 
<th> nReviews </th> 
<th> Ratings_e </th> 
<th> Text_e </th> 
<th> rn </th> 
<th> launcher_html </th>  

<td align=\"right\"> 1 </td> 
<td> a1 </td> <td align=\"right\">   2 </td> 
<td> 1, 2 </td> 
<td> asd, dfdsf </td> 

<td align="left">   1 </td> 
<td> <script>    function openWindow1() {     var newtab1 ="", "anotherWindow", "width=300,height=150");;    newtab1.document.write("<table border=1><button onclick='exportTableToCSV('members.csv')'>Export HTML Table To CSV File</button><br></br><tr><th>Ratings_e</th><th>Text_e</th></tr><tr><td>1</td><td>asd</td></tr><tr><td> 2</td><td> dfdsf</td></tr></table>");    } </script>  

<button onclick="openWindow1()"> Open Window </button>   
</td> </tr>\n   </table>

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.