SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard trampt's Avatar
    Join Date
    Jan 2003
    Location
    Los Angeles, CA
    Posts
    1,997
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    yahoo drag & drop (bgimage not working on drag)

    I found this script on yahoo and I think I found the right place to add a background image to a drag event but its not showing up. If I change the border below it does change the drag state so I believe this is the right piece of code, but when I add the line in for the backgroundImage it doesn't work.

    Got this from:
    http://developer.yahoo.com/yui/examp...html?mode=dist

    Whole script I pulled the below from:
    http://developer.yahoo.com/yui/build...op/dragdrop.js


    Any ideas?

    Code:
    /**
     * Create the drag frame if needed
     */
    YAHOO.util.DDProxy.createFrame = function() {
        var THIS = YAHOO.util.DDProxy;
    
        if (!document || !document.body) {
            setTimeout(THIS.createFrame, 50);
            return;
        }
    
        if (!THIS.frameDiv) {
            THIS.frameDiv = document.createElement("div");
            THIS.frameDiv.id = THIS.dragElId;
            var s = THIS.frameDiv.style;
    	s.position = "absolute";
            s.visibility = "hidden";
            s.cursor = "pointer";
            s.border = "1px dotted #aaa";
    	s.backgroundImage = "url(../images/button_drag.gif)";
            s.zIndex = 999;
    	s.textAlign = "center";
            document.body.appendChild(THIS.frameDiv);
    
        }
    };

  2. #2
    SitePoint Wizard trampt's Avatar
    Join Date
    Jan 2003
    Location
    Los Angeles, CA
    Posts
    1,997
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no one has any ideas?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •