Drag n drop value

Posted on 2013-11-20
Last Modified: 2013-11-20
Normally if you drag an image to an input it will put the image src in the input.
Is there a way to intercept this and place the image id in the textbox instead?
Or if not an image then some other way to do a drag n drop of a value/id etc

Preferably without jQuery UI
Question by:Gary
  • 4
  • 2
LVL 43

Expert Comment

by:Chris Stanyon
ID: 39663368
Hey Gary,

I think you'll find this behaviours is specific to the OS and not the browser - certainly not HTML, so I think you'll struggle to hook into it.

Any specific reason you don't want to use jQueryUI - it's a breeze with that.
LVL 33

Assisted Solution

by:Big Monty
Big Monty earned 100 total points
ID: 39663376
using straight javascript, you could try using the onkeyup to detect the drag of some text. from there, it's just a matter of parsing out the string you want
LVL 58

Author Comment

ID: 39663394
I have found an example using the UI, I did say no UI but thinking about it, it is only for my backend so I can live with it.
This is what I found in the meantime and seems to work fine
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

LVL 43

Expert Comment

by:Chris Stanyon
ID: 39663427
You're not just limited to getting the ID - along with data attributes you can store whatever data you like and transfer that into your droppable :)
LVL 43

Accepted Solution

Chris Stanyon earned 400 total points
ID: 39663460
Not sure what your requirements are, but have a play with this:
LVL 58

Author Closing Comment

ID: 39663583
Doesn't work in IE, but I can live with that.
LVL 43

Expert Comment

by:Chris Stanyon
ID: 39663609
Doesn't work in IE, but I can live with that.

Unfortunately, we all have to!!

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How do you setTimeout in JQuery? 1 22
Passport Expiry 3 44
Question about JQuery and 3 27
DataTables + iCheck + pagination Issue 2 23
Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question ( on how to make a page show some balloons animate up a page…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question