hi guys,
i have simple form containing 2 x multiple selects -
products_available and products_selected. products_selected is
populated from a query.
problem: the products_selected select will not pass any pre-populated
items when the form is submitted. it will only work if i pass them
back to products_available and then back again??
the code i have to initialise qforms is...
<SCRIPT LANGUAGE="JavaScript">
<!--//
// initialize the qForm object
objForm = new qForm("related_product_form");
// make the User field a container, this will ensure that
the "reset()"
// method will restore the values in the select box, even if
they've
// been removed from the select box
objForm.products_available.makeContainer();
// setting the "dummyContainer" property to false will ensure
that no values
// from this container are included with the value
objForm.products_available.dummyContainer = true;
// make the "Members" field a container--every item in
the "Members" select box
// will be part of the container, even if the item isn't
selected.
objForm.products_selected.makeContainer();
stProductsSelected = new Object();
<cfoutput query="getRelated">
stProductsSelected["#getRelated.product_idfk#"]
= "#getRelated.product_title#";
</cfoutput>
objForm.products_selected.populate(stProductsSelected);
//-->
</SCRIPT>