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

Re: Closing a Drag and Drop panel

Expand Messages
  • heavydevelopment
    Jing, Thanks for getting back to me. I get the concept, I just don t know enough about how the YUI drag and drop works (much less my js skills are a little
    Message 1 of 3 , Feb 4, 2008
      Jing,

      Thanks for getting back to me. I get the concept, I just don't know
      enough about how the YUI drag and drop works (much less my js skills
      are a little rough around the edges anyways, but I'm learning). I
      adapted the drag and drop reorder example and it for the most part
      works the way I want it too. Here is a link to the site:

      http://iweb.sjk.com:8080/

      Also here is a zip of just the html, css and js:

      http://www.sjk.com/index.zip

      Any additional help would be appreciated.

      Thanks!

      Eric


      --- In ydn-javascript@yahoogroups.com, "Jing Ceawlin" <zjply4000@...>
      wrote:
      >
      > In your case, 'this' points to YAHOO.example object. So
      YAHOO.example has to
      > be an object which has the getEl method. Otherwise you would get
      that error.
      >
      > Hope this helps :)
      >
      > On Jan 31, 2008 5:13 AM, heavydevelopment <heavydevelopment@...>
      > wrote:
      >
      > > I'm trying to close a drag and drop panel and I'm getting an error
      > > that says 'this.getEl is not a function' in FireBug. I'm a little
      > > confused as to why? Is there a part of YUI I'm failing to
      reference to?
      > >
      > > Here's the js:
      > >
      > > YAHOO.example.destroy = function(wid) {
      > > var el = this.getEl();
      > > var a = new YAHOO.util.Anim(el, { opacity: { to: 0 } }, 0.5,
      > > YAHOO.util.Easing.easeOut);
      > > a.onComplete.subscribe(function() {
      > > YAHOO.util.Dom.setStyle(el, 'display', 'none');
      > > });
      > > a.animate();
      > > var sUrl = encodeURI('ajax/get.cfm?userid=' + userid + '&pageid=' +
      > > pageid + '&widgetid=' + wid);
      > > YAHOO.util.Connect.asyncRequest('GET', sUrl,
      > > { success:handleSuccess, failure:handleFailure });var
      > > handleSuccess = function(o){};
      > > var handleFailure = function(o){};
      > > };
      > >
      > > Here is the html calling the js:
      > >
      > > <li class="list1" id="li1_1" name="1">
      > > <!-- begin company news widget -->
      > > <div class="widgetBox">
      > > <div id="widgetHeader">
      > > Company News
      > > <!-- end #headerLogo -->
      > > </div>
      > > <div id="widgetExitButton">
      > > <a href="#" onclick="YAHOO.example.destroy(1); return
      > > false;"><img src="images/wb_exit.png" alt="Exit Button" width="14"
      > > height="12" border="0" /></a>
      > > <!-- end #headerDateTime -->
      > > </div>
      > > <!-- end #widgetheaderBox -->
      > > </div>
      > > <div class="widgetContentBox">
      > > <div class="widgetContent">
      > > <p><strong>Headline</strong><br />Lorem ipsum dolor sit
      > > amet, consetetur sadipscing elitr, sed elitr, sed diam nonumy eirmod
      > > tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
      > > voluptua. Lorem ipsum dolor sit amet<br /><br />Lorem ipsum dolor sit
      > > amet, consetetur sadipscing elitr, sed elitr, sed diam nonumy eirmod
      > > tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
      > > voluptua. Lorem ipsum dolor sit amet</p>
      > > </div>
      > > </div>
      > > <!-- end company news widget -->
      > > </li>
      > >
      > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.