[CLOSED] [1.0] Drag and Drop - javascript error

  1. #1

    [CLOSED] [1.0] Drag and Drop - javascript error

    I have an issue while using the drag and drop method, I receive an error while dragging any panel.

    The js error I get is when the following function gets executed: Ext.getCmp(this.el.dom.id)

    "this.el" is undefined



    I have several divs placed on my page with the following class:

    <div id="xx0232" class="adoreeditordroppanel">&amp;nbsp;


    On my PageLoad I place the following DropTarget:

    
                DropTarget dt = new DropTarget();
                dt.Target = "${.adoreeditordroppanel}";
                dt.Group = "DropPanelsDD";
                dt.OverClass = "invite";
                dt.NotifyDrop.Handler = "var cmp = Ext.getCmp(this.el.dom.id);cmp.add(data.panel);cmp.doLayout.defer(10,cmp);";
                dt.NotifyOver.Handler = "Ext.select('.adoreeditordroppanel').removeClass('invite'); this.el.addClass('invite');";

    And I place a certain amount of Panels which should be draggable:

    
                                Panel WidgetPanel = this.BuildWidgetPanel(Widget.PageWidgetId, Widget.WidgetFile, "Widget");
                                WidgetPanel.DraggableConfig.Group = "DropPanelsDD";
                                WidgetPanel.Draggable = true;
                                WidgetPanel.DraggableConfig.StartDrag.Handler = "Ext.select('.adoreeditordropPanel').addClass('x-drop-marker');";
                                WidgetPanel.DraggableConfig.EndDrag.Handler = "Ext.select('.adoreeditordropPanel').removeClass('x-drop-marker');";
                                WidgetPanel.Collapsible = true;


  2. #2

    RE: [CLOSED] [1.0] Drag and Drop - javascript error

    Hi,

    Your drop target is div element. Therefore you cannot use Ext.getCmp which works with Ext.Net components only. I suggest to use the following handler
     <NotifyDrop Handler="this.el.appendChild(data.panel.el);" />

    or replace divs by Panel or Container controls
  3. #3

    RE: [CLOSED] [1.0] Drag and Drop - javascript error

    Super.. thnx once again ;-)

    solved again.

Similar Threads

  1. [CLOSED] drag and drop`
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: May 12, 2011, 2:42 PM
  2. [CLOSED] Need Help With Drag & Drop Example in VB
    By garrisrd in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 12, 2010, 4:34 PM
  3. [CLOSED] [1.0] Portlet drag-drop error
    By tansu in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 11, 2009, 6:40 PM
  4. Drag'n Drop
    By Yannis in forum 1.x Help
    Replies: 1
    Last Post: Oct 28, 2009, 6:14 PM
  5. [CLOSED] MultiSelect with drag and drop, Drop listener
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 30, 2009, 8:25 AM

Posting Permissions