jason_kelly
08-27-2013, 01:15 PM
Hello,
I need the help of the experts here on this forum.
Much thanks and appreciation for everyones help and support.
What I would like to accomplish is, at the click of a button is to:
1. copy the existing table below
2. open a new popup window
3. Use the document.write to write the table from the previous page onto the new popup page.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Language" content="en-ca">
</head>
<body>
<table id="data" border="1" cellspacing="1" width="100" id="table1">
<tr>
<th>Fruits</th>
<th>Vegetables</th>
<th>Colors</th>
<th>Quantity</th>
<th>Price</th>
</tr>
<tr>
<td>Apples</td>
<td>Carrots</td>
<td>red</td>
<td>10</td>
<td>0.99</td>
</tr>
<tr>
<td>Pears</td>
<td>Celery</td>
<td>blue</td>
<td>24</td>
<td>1.00</td>
</tr>
<tr>
<td>Mangos</td>
<td>Broccoli</td>
<td>green</td>
<td>12</td>
<td>1.50</td>
</tr>
<tr>
<td>Oranges</td>
<td>Cauliflower</td>
<td>purple</td>
<td>48</td>
<td>1.25</td>
</tr>
</table>
<br>
<input type="button" value="test it"/>
</body>
</html>
I need the help of the experts here on this forum.
Much thanks and appreciation for everyones help and support.
What I would like to accomplish is, at the click of a button is to:
1. copy the existing table below
2. open a new popup window
3. Use the document.write to write the table from the previous page onto the new popup page.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Language" content="en-ca">
</head>
<body>
<table id="data" border="1" cellspacing="1" width="100" id="table1">
<tr>
<th>Fruits</th>
<th>Vegetables</th>
<th>Colors</th>
<th>Quantity</th>
<th>Price</th>
</tr>
<tr>
<td>Apples</td>
<td>Carrots</td>
<td>red</td>
<td>10</td>
<td>0.99</td>
</tr>
<tr>
<td>Pears</td>
<td>Celery</td>
<td>blue</td>
<td>24</td>
<td>1.00</td>
</tr>
<tr>
<td>Mangos</td>
<td>Broccoli</td>
<td>green</td>
<td>12</td>
<td>1.50</td>
</tr>
<tr>
<td>Oranges</td>
<td>Cauliflower</td>
<td>purple</td>
<td>48</td>
<td>1.25</td>
</tr>
</table>
<br>
<input type="button" value="test it"/>
</body>
</html>