Results 1 to 8 of 8

Thread: drag and drop

  1. #1
    Join Date
    Sep 2007
    Location
    west sacramento
    Posts
    25
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Question drag and drop

    i've been googling all day, but haven't found exactly what i was looking for.

    i'm searching for a script that allows me to drag elements around the screen (like an image, div, etc.). i want the element to return to its original position if it is not dropped in the correct place (let's say another div). if it is dropped in the correct place, something happens (like a new window opening).

    so far, i've found scripts that let me drag items. i've found scripts that let me drop items in specific places. i even figured out how to get a new window opened when the element is dropped in the right place.

    but i can't find a script where i can do this with multiple draggable elements, each with its own drop partner (eg, divA can only be dropped in divB otherwise it returns to its original spot; divC can only be dropped in divD otherwise it returns... and so on).

    the closest thing i found was this: http://developer.yahoo.com/yui/examp...dd-circle.html

    any help would be appreciated!

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    You can do it in Flash, quite easily.

  3. #3
    Join Date
    Sep 2007
    Location
    west sacramento
    Posts
    25
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Medyman View Post
    You can do it in Flash, quite easily.
    yes, i got that notion during my google searches. but the site i'm building is all css and javascript. just trying to keep it that way. flash would be my last resort. plus, i know less about flash than i do about javascript! thanks.

  4. #4
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Mootools would do the job fairly well.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  5. The Following User Says Thank You to tech_support For This Useful Post:

    radiofriendlybox (03-10-2008)

  6. #5
    Join Date
    Sep 2007
    Location
    west sacramento
    Posts
    25
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by tech_support View Post
    Mootools would do the job fairly well.
    i'll have to play around with this to see what i can come up with. but that's a great site. thanks!

  7. #6
    Join Date
    Mar 2008
    Posts
    12
    Thanks
    0
    Thanked 5 Times in 4 Posts

    Default

    I have created such a function for my interactive quiz script framework which allows to create interactive learning quizzes. In some of such quizzes a drag&drop functionality is needed. Take a look!

    Framework For Interactive Learning Quizzes

    Although my site is mostly in German I can provide you with help in English.

    Have fun!

    Felix Riesterer.

  8. The Following User Says Thank You to Felix Riesterer For This Useful Post:

    radiofriendlybox (03-31-2008)

  9. #7
    Join Date
    Mar 2008
    Posts
    218
    Thanks
    7
    Thanked 19 Times in 19 Posts

    Default

    This will do it:
    HTML Code:
    http://education.qld.gov.au/virtualschool/html/students/infohub/virtual_quiz.htm
    but it's not crosss platforn FF2 doesn't work.

  10. The Following User Says Thank You to tfit For This Useful Post:

    radiofriendlybox (03-31-2008)

  11. #8
    Join Date
    Mar 2008
    Posts
    12
    Thanks
    0
    Thanked 5 Times in 4 Posts

    Default

    Quote Originally Posted by tfit View Post
    This will do it:
    HTML Code:
    http://education.qld.gov.au/virtualschool/html/students/infohub/virtual_quiz.htm
    but it's not crosss platforn FF2 doesn't work.
    No, even worse than that! Unless you want your page to be usable exclusively in Internet Explorer, you'll have to use a different script. In my opinion the first is the worst possible choice!

    Use my framework and everything will work out-of-the-box! I can offer you help if you have trouble with the German CSS class names. But mind this: <body onload="do_something()"> means "do_something()" will run exclusively and will break other scripts that also try to run onLoad but attempt to do so unobtrusively (like Lightbox does - as well as my framework)!

    Felix Riesterer.

  12. The Following User Says Thank You to Felix Riesterer For This Useful Post:

    radiofriendlybox (03-31-2008)

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
  •