Loading ...
Sorry, an error occurred while loading the content.

Re: DDPlayer and DDProxy at the same time

Expand Messages
  • Michael Shelestov
    The solution is subscribe to events of DDProxy. Something like this:
    Message 1 of 2 , Nov 29, 2007
    • 0 Attachment
      The solution is subscribe to events of DDProxy. Something like this:

      <form id="form1" runat="server">
      <textarea id="txt"></textarea>
      <div id="dd-demo-1" class="dd-demo" style="width:50">11</div>
      <div id="dd-demo-2" class="dd-demo" style="width:50">22</div>
      <div id="dd-demo-3" class="dd-demo" style="width:50">33</div>
      <div id="dd-demo-3-proxy" style="width:50">33</div>

      <script type="text/javascript">
      (function() {
      var dd, dd2, dd3;
      YAHOO.util.Event.onDOMReady(function() {
      dd = new YAHOO.util.DDProxy("dd-demo-1");
      dd2 = new YAHOO.util.DDProxy("dd-demo-2");

      dd3 = new YAHOO.util.DDProxy("dd-demo-3", "default", {
      dragElId: "dd-demo-3-proxy",
      resizeFrame: false
      }
      );
      dd.onDrag = MyOnDrag;
      dd.startDrag = MyStartDrag;
      dd.endDrag = MyEndDrag;
      dd2.onDrag = MyOnDrag;
      dd2.startDrag = MyStartDrag;
      dd2.endDrag = MyEndDrag;
      dd3.onDrag = MyOnDrag;
      dd3.startDrag = MyStartDrag;
      dd3.endDrag = MyEndDrag;

      });
      })();
      function MyOnDrag(e, id) {
      form1.txt.value = "MyOnDrag " + e.clientX + " " +
      e.clientY + " " + this.id;
      }
      function MyStartDrag(x, y)
      {
      form1.txt.value = "My Start drag! " + this.id;
      }
      function MyEndDrag (e)
      {
      form1.txt.value = "My End drag! " + this.id;
      YAHOO.util.Dom.setXY(this.id, YAHOO.util.Event.getXY
      (e));
      }
      </script>
      </form>
    Your message has been successfully submitted and would be delivered to recipients shortly.