|
|
Drag and drop table columns
There are a lot of excellent drag-n-drop Javascript libraries available
out there
http://script.aculo.us/
http://www.walterzorn.com/dragdrop/dragdrop_e.htm
http://www.youngpup.net/2001/domdrag/tutorial
http://tool-man.org/examples/sorting.html
Yet, I am having a hard time finding a good demo of re-ordering HTML
table columns by drag and drop. List items, yes, but not table columns.
Can someone point me to a few demos?
Thanks
|
|
0
|
|
|
|
Reply
|
VA
|
11/9/2005 2:50:15 AM |
|
Bump. Thanks.
|
|
0
|
|
|
|
Reply
|
VA
|
11/10/2005 3:40:20 PM
|
|
Is this really that difficult? I am really not finding any good
examples of this. Is this not the right newsgroup for this question?
Thanks
|
|
0
|
|
|
|
Reply
|
VA
|
11/11/2005 7:15:04 PM
|
|
VA wrote:
> Is this really that difficult?
Quite. What you have overlooked is that there is no such thing as a
column in the usual sense in an HTML table. There are rows that have
cells which can span several rows or columns, i.e. the cells form the
columns. Now to move columns, one has to determine what a column is.
Iff all rows have the same number of cells, i.e. no cell spans over
more than one column and row, at least the remove/include part should
be easy with W3C DOM 2 Core insertBefore(). If not, it is rather
difficult.
> I am really not finding any good examples of this.
Why don't you bother trying to write one yourself, and then post your
approach (whether working or not)?
> Is this not the right newsgroup for this question?
It's the right group but perhaps the wrong attitude on your part.
PointedEars
|
|
0
|
|
|
|
Reply
|
Thomas
|
11/11/2005 7:29:35 PM
|
|
Thomas 'PointedEars' Lahn wrote:
> Iff all rows have the same number of cells, i.e. no cell spans over
> more than one column and row, at least the remove/include part should
> be easy with W3C DOM 2 Core insertBefore()
Yes, I am referring to simple HTML tables with 1 cell occupying one
column in 1 row. No spanning.
I received some quality help from this group regarding moving table
columns around at
http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/76ead9d7b8920f42/a9a7ebdd20d2589e
So I am comfortable with the insertBefore and stuff, it is the dragging
and dropping that I am requesting help with.
> Why don't you bother trying to write one yourself, and then post your
> approach (whether working or not)?
I dont know where to begin. I am new to drag/drop stuff, can you get me
started please?
For instance:
1. As the mouse is moving, how would I know which column it is moving
over?
2. When the mouse is released, how to determine which column it is
dropped on?
Thanks
|
|
0
|
|
|
|
Reply
|
VA
|
11/12/2005 5:04:08 AM
|
|
|
4 Replies
486 Views
(page loaded in 0.385 seconds)
|
|
|
|
|
|
|
|
|