javascript - How can I add table to ajax response -
here code. tried lot. unable find luck. want ajax response should come in tabular form.
if (uri.endswith("updateempbyid.action")) { employee emp; try { emp = new employeedaoimpl().findemployee(integer .parseint(request.getparameter("val"))); out.print("<div>"); out.print("<form action='updateemployee.action'><p> id:<input type='number' name='id' value='" + emp.getid() + "' readonly></p>"); out.print("<p> name:<input type='text' name='name' value='" + emp.getname() + "'></p>"); out.print("<p> designation:<input type='text' name='desig' value='" + emp.getdesignation() + "'></p>"); out.print("<p> salary:<input type='text' name='salary' value='" + emp.getsalary() + "'></p>"); out.print("<p><input type='button' value='update' class = 'button'></p></form>"); out.print("</div>"); } catch (numberformatexception e) { e.printstacktrace(); } catch (sqlexception e) { e.printstacktrace(); } }
thanks.
you forward object "emp" view page(i.e jsp page) , can print details tabular form
Comments
Post a Comment