ClioSport.net

Register a free account today to become a member!
Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

Javascript table/newwindow question



Basically got java code, user opens page they are promted for "Money invested" , "Rate of Interest" , "Length of Money in investment" ... then the page loads and all what is on the page is a calculate button. They click this it opens a new window and its supposed to display a table with all the information they inputted and the correct answers. For the moment I have the answer appearing just as a string on new window but need them to be displayed in a table on the new page not just as text....


... I had the table appearing on the actual orignal page just to see if it was working, the code for this was:


<table border="1">
<tr>
<td>Money invested (£)</td>
<td><script> type="text/javascript">document.write(money);</script></td>
</tr>
<tr>
<td>Interest Rate (%)</td>
<td><script> type="text/javascript">document.write(interest);</script></td>
</tr>
<tr>
<td>Time Invested (months)</td>
<td><script> type="text/javascript">document.write(payments);</script></td>
<tr>
<td>Total Amount</td>
<td><script> type="text/javascript">document.write(result);</script></td>
</tr>
<tr>
<td>Interest</td>
<td><script> type="text/javascript">document.write(actinterest);</script></td>
</tr>
</table>

But I dont know how I can get the table appearing on the newpage properly... ive tried "newdocument.write(then all the table code) but no luck! anyone have any ideas?

Cheers
 


Top