Link to home
Start Free TrialLog in
Avatar of Gary
GaryFlag for Ireland

asked on

Drag n drop value

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
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

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.
SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gary

ASKER

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
http://jsfiddle.net/dv3EL/76/
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 :)
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gary

ASKER

Doesn't work in IE, but I can live with that.
Doesn't work in IE, but I can live with that.

Unfortunately, we all have to!!