Search Results

Search found 1 results on 1 pages for 'user3599482'.

Page 1/1 | 1 

  • How to put PrintWriter object content in to table cell

    - by user3599482
    I have a small problem about a content returning from servlet to put in table cell. In javascript I am calling servlet method using post, it returns some content and I have to put it in two different <td> cells. here is my code, In javascript, $.post('<%=request.getContextPath()%>/controller/UserLockController',{'userName':userName,'status':status}, function(data) { document.getElementById("status_"+userName).innerHTML=data; document.getElementById("td_"+userName).innerHTML=data; }); in servlet it writes as, out.println("<td id=\"status_"+inputParam+"\">Locked</td>"); out.println("<td id=\"td_"+inputParam+"\"><a href=\"#\" class=\"btn btn-sm btn-primary unlockBtn\" id=\"togBtn_"+inputParam+"\" onClick=\"LockAccount('"+inputParam+"','"+status+"')\">UnLock</td>"); Here content is returning but problem is the both <td> return from servlet will fit in single cell of html table. how to solve this please help me.

    Read the article

1