try this:
1) create a js function in your main page (the one that opens a cfwindow):
<script type="text/javascript>
createSortables = function() {
  // users available and assigned lists:
 $("ul#sListAvailable, ul#sListAssigned").sortabl
    connectWith: "ul.userList",
    placeHolder: "ul.userList",
    update: function() {

2) remove your current $(document).ready(...) block (completely if it is
in the page loaded in cfwindow, or just the part of it that creates the
sortable lists if it is in the main page and also has other functions
used by your main page)

3) in the page that loads inside cfwindow add this line as last line
before the closing </body> tag:
<cfset ajaxonload('createSortables')>

Azadi Saryev

On 20/11/2009 06:34, Joshua Rowe wrote:
> Hello!
> I have a page where a user can select other users to assign to a project.  
> The user drags and drops a user from a list on the left side into another 
> list on the right side.  This is all handled using an unordered list and 
> jQuery's sortable() function.  This works great by itself, but I am wanting 
> to put this into a cfwindow.  I have attached the code below.
> If I wrap this code into a cfwindow tag, it works.  However, when I drop the 
> code in a file somewhere and set the "source" attribute in the cfwindow tag 
> to point to that file, it doesn't work.  It also doesn't work if I use the 
> ColdFusion.Window.create() function.  Any thoughts?
> <script type="text/javascript" src="scripts/jQuery.js"></script>
> <script type="text/javascript" src="scripts/jQuery_MenuDragDrop.js"></script>
> <script type="text/javascript">
> $(document).ready(function() {
>       // users available and assigned lists:
>       $("ul#sListAvailable, ul#sListAssigned").sortable({
>               connectWith: "ul.userList",
>               placeHolder: "ul.userList",
>               update: function() {
>                       ...........
>               }
>       });
> });
> </script>
> <label>Assign Users:</label>
> <b>Available Users:</b><br>
> <ul class="userList" id="sListAvailable">
>       <cfoutput query="qryAccounts">
>               <li class="userList" id="#iLoginID#">#sNameFirst# 
> #sNameLast#</li>
>       </cfoutput>
> </ul>
> <b>Assigned Users:</b><br>
> <ul class="userList" id="sListAssigned"></ul>

Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists

Reply via email to