File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dynamic Row generation? no source code?

 
Asheesh Nehra
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to generate dynamic rows in jsp with struts 1. i used this javascript to clone row

function addRow(tableID)
{
var tblBody = document.getElementById(tableID);
var newNode = tblBody.rows[1].cloneNode(true);
tblBody.appendChild(newNode);
}

now problem is there no source code of cloned rows . only first row source code is there I declared properties of the form as Arrays in ActionForm.

any body tell me how to get cloned rows source code? or any other way of generation dynamic rows?

Thanks in Advance
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is impossible to view the page source and see the new rows. The view source is only what came from the server, it is not what is in your browser's memory.

Is your real problem when you post to the server, you are not getting the new form element's values?

Eric
 
Asheesh Nehra
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK , then i need to generate rows at client side , while data entry , it is as invoice you can generate rows as no. of items are purchased. how can i implement this kind of scenario while using struts 1. help me
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64204
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts executes on the server. It will be of no help with client-side activities.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic