That sounds like the type of solution I'm looking for.
I've found some drag-n-drop re-order js, but I think the
arrow version of reordering would be more user friendly.

Thanks for the explanation.

Rick

> -----Original Message-----
> From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 13, 2008 11:29 AM
> To: CF-Talk
> Subject: Re: Best way to order appearance of database content...
> 
>  >>I'm guessing the Javascript automatically assigns new values
> to the hidden field for seq for each paragraph upon reordering?
> 
> Not exactly.
> I use a table to display elements, each one in its own row TR element.
> I use some move up and move down function to switch two TR element in a
> table.
> The row has icons like up and down arrows. For example:
> <TR ID="#paraId#">
> <TD onclick="move(this, -1)"><IMG SRC="up.gif"  WIDTH="16" HEIGHT="13"
> BORDER="0" ALT="Move up"></TD>
> <TD onclick="move(this,  1)"><IMG SRC="down.gif"  WIDTH="16" HEIGHT="13"
> BORDER="0" ALT="Move down"></TD>
> <TD>(description of the element)</TD>
> </TR>
> 
> The the onClick function will find the TR parent element, the one
> before, or after and switch the two rows in the table.
> Then only on submit, the function setSeq is called.
> What it does, is get the table containing the elements, find all TRs in
> the order the use has chosen,
> each TR has an id which is actually the id of the paragraph. From these,
> the function set the valu of the listPara hidden field.
> Pretty simple:
> function setSeq()
>     {
>     var tb = document.getElementById("tablePara");
>     if (tb)
>         {
>         var tr = tb.rows;
>         var nbTr = tr.length;
>         var val = tr[0].id;
>         for (var i = 1; i<nbTr ; i++) val += "," + tr[i].id
>         document.formul.listPara.value = val;
>         }
>     }
> 
> --
> _______________________________________
> REUSE CODE! Use custom tags;
> See http://www.contentbox.com/claude/customtags/tagstore.cfm
> (Please send any spam to this address: [EMAIL PROTECTED])
> Thanks.
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301179
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to