Ondragstart没有在弹出窗口中触发

时间:2013-06-25 06:27:41

标签: javascript jquery jquery-ui drag-and-drop draggable

I am doing drag and drop functionality using jquery tablednd.

设计如下:表内的中继器控制

并在脚本代码中

       $(document).ready(function () {
        $("#tblReOrder"). tablednd({
            onDrop: function (table, row) {
                row.className = row.className.replace('mmt-rowHighlightOnDrag ', '');
                var rows = table.tBodies[0].rows;
                var orderValue = "";
                for (var i = 1; i < rows.length; i++) {
                    var ctlObject = rows[i].getElementsByTagName("INPUT");
                    if (ctlObject != null) {
                        orderValue += "," + ctlObject[1].value;
                    }
                }
                var orderDetails = document.getElementById('<%= orderDetails.ClientID%>');
                orderDetails.value = orderValue;
                // The checkbox is getting unselected while drag/drop event field in IE6 browser.
                // Checkbox initial values will be reassigned during drop row.  
                var isIEVersion = getIEVersionNumber() < 7;
                if (isIEVersion) {
                    AssignCheckBoxValue(rows);
                }
            },
            onDragStart: function (table, row) {
                row.className = 'mmt-rowHighlightOnDrag ' + row.className;
                var beforeDragRows = table.tBodies[0].rows;
                rowsCheckBoxStatus = "";
                for (var i = 1; i < beforeDragRows.length; i++) {
                    if (rowsCheckBoxStatus != "")
                        rowsCheckBoxStatus += ";";
                    rowsCheckBoxStatus += beforeDragRows[i].childNodes[3].firstChild.defaultValue + "|";
                    rowsCheckBoxStatus += beforeDragRows[i].childNodes[1].firstChild.firstChild.checked;
                }
                rowsCheckBoxStatus += ";";
            }

        });

        objCheckAllImage = document.getElementById('<%= ImageCheckAll.ClientID %>');
        if (objCheckAllImage != null)
            ShowCheckAllImage(objCheckAllImage)
    });
}

拖放功能在普通页面中正常工作。如果在弹出窗口中调用此页面,则OndragStart未触发。 我搜索了很多解决方案,没有任何工作。

请帮我纠正这个问题。

提前致谢 Jhanani

0 个答案:

没有答案