>>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:301177
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4