Printing a processed data in html table <td> tags?
-
int a=10; int b=20; int c=a*c; out.println("<table border='1'>"); out.println("<tr>"); out.println("<td>Amount Payable</td>"); out.println(c); <---------------------------------------… i hav to print the vaule of 'c' i.e. 200) out.println("</tr>"); out.println("<tr>"); out.println("<td>Another attribute</td>"); out.println(print values);<-------------------------------… another value here) out.println("</tr>"); out.println("</table>"); its a servlet programming. if the c is enclosed with <td> </td> tags the CHARACTER 'c' prints and not the value. is it possible to print the VALUE of c
-
Answer:
Something like this should work: out.println("<td>" + c + "</td>");
Yashwant... at Yahoo! Answers Visit the source
Related Q & A:
- How to insert data from one table to another?Best solution by Stack Overflow
- How to display HTML table with angularJS?Best solution by Stack Overflow
- How do I create an HTML table, in jQuery, with JSON data?Best solution by Stack Overflow
- What are some phones for Verizon Wireless without a data plan or with a cheap data plan?Best solution by Yahoo! Answers
- What's the difference between a static data member and a regular data member?Best solution by eHow old
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.