Avoid clicking a draggable hyperlink after onEndDrag

J

Jason

I have a hyperlink that is draggable (using Prototype's "new
Draggable()" construct). I want to be able to drag the link without
actually 'clicking' the link once i end the drag. Is there a way to
disable this event?

- Jason
 
A

ASM

Jason a écrit :
I have a hyperlink that is draggable (using Prototype's "new
Draggable()" construct).

where can we find or see this splendid "new Draggable()" code ?
 
J

James Black

Jason said:
I have a hyperlink that is draggable (using Prototype's "new
Draggable()" construct). I want to be able to drag the link without
actually 'clicking' the link once i end the drag. Is there a way to
disable this event?

I can think of two options for you:
1) Use a span tag, or label, and make it operate like a link, so you
can set or unset the onclick function.

2) When drag is started, change the onclick to point to a function that
will catch the event and prevent it from bubbling up. When the drag is
all done, use setTimeout for 50ms or so, and then set the onclick so
that it will function correctly again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top