SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2006
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    script.aculo.us drag problem when loading with ajax

    When loading draggables through ajax dynamically on page, they don't drag! Has any one else encountered this problem yet? I am loading a list of images and it loads up to a div. I've done this before in a slightly different situation but this one seems to not work. Any thoughts?

  2. #2
    SitePoint Zealot
    Join Date
    Mar 2006
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes it only happens when it is loading dynamically through ajax. When the image is loaded in the div when the page is loaded. NP at all. I've thought of maybe loading everything in advance and hide the div but that won't support multiple page navigation and keep everything draggable. So if you have an idea please don't stay quiet .

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2006
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Allright I am getting somewhere now. The ajax.updater was not set to evaluate scripts coming back. I'll keep everyone updated. Hopefully this will save someone time down the road.

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Location
    London, UK
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bare in mind that if your AJAX code creates more code using the 'innerHTML' then the drag and drop won't work on it.
    The is a common misstake by those who use Behaviour, because your AJAX code might appear to create DOM elements on the fly but what it actually does is that it sends it as a big fat string variable which happens to contain HTML tags.


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
  •