Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Building a Dynamic Web Page

 
Steve Dyke
Ranch Hand
Posts: 1642
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to display a list of items on an HTML page along with an empty table with specified columns, then be able to drag a list item to the table, creating a row. I would also need the other cells on the row to accept input.

Example:

The items in the list are project tasks.

The table columns are task, hours to complete, estimated complete date.

Also would need to move the task around once they are added to table, or beable to drag from list to particular existing row.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. DOM manipulation let's you do pretty much anything you want to do.
 
Steve Dyke
Ranch Hand
Posts: 1642
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you lead me to some example or help me get started? I have seen some examples on draging and droping between to containers of some sort but not from list to table.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Drag and drop can work across any elements. I would not even think of touching this without the aid of a JavaScript library that supports drag and drop.

The rest is just learning how to move, create and remove DOM elements. Also something much easier with library support.
 
Steve Dyke
Ranch Hand
Posts: 1642
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Drag and drop can work across any elements. I would not even think of touching this without the aid of a JavaScript library that supports drag and drop.



Can you suggest a JS library?
 
Steve Dyke
Ranch Hand
Posts: 1642
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I get a suggestion on a JS library to use for Drag and Drop functionality?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both Scriptaculous and jQuery have easy-to-user D-n-D, but these days, Im not particularly fond of Scriptaculous (which also requires Prototype, which has also fallen from my favor).

DOM manipulation with jQuery is also a breeze.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic