# Drag and Drop without bugging the server...?

**URL:** <https://www.ruby-forum.com/t/drag-and-drop-without-bugging-the-server/170327>\
**Category:** Rails\
**Created:** [June 16, 2009, 1:43am UTC](https://www.ruby-forum.com/t/drag-and-drop-without-bugging-the-server/170327 "2009-06-16T01:43:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dezrtdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f4b2a3/32.png) [@dezrtdude](https://www.ruby-forum.com/u/dezrtdude)\
**Post date:** [June 16, 2009, 1:43am UTC](https://www.ruby-forum.com/t/drag-and-drop-without-bugging-the-server/170327/1 "2009-06-16T01:43:38Z")

</div>

Hi All,

Is there an equivalent of “link\_to\_function” (instead of “:action”)  
when using “draggable\_element”? Basically I need to drag and drop  
some items and have it reflected locally without contacting the  
server.

My current setup is that I have two DIVs with various list items. I  
have one full of items with domids “points[selected][name]” and  
another div with domids “points[available][name]”. I need to drag and  
drop between them without consulting the server. Only on save do I  
wish to bother the server.

I’ve watched all the RailsCasts on _similar_ items, but it doesn’t  
seem to cover having a non-standard action (i.e. Helper Function)  
triggered from a “draggable\_element” method.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![dezrtdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f4b2a3/32.png) [@dezrtdude](https://www.ruby-forum.com/u/dezrtdude)\
**Post date:** [June 16, 2009, 11:35am UTC](https://www.ruby-forum.com/t/drag-and-drop-without-bugging-the-server/170327/2 "2009-06-16T11:35:10Z")

</div>

On 16 Jun 2009, at 01:43, gberz3 wrote:

> I’ve watched all the RailsCasts on _similar_ items, but it doesn’t  
> seem to cover having a non-standard action (i.e. Helper Function)  
> triggered from a “draggable\_element” method.

Yes, you can do that. It’s called writing your own javascript code.  
The rails helpers are meant for interaction with Rails. If you want to  
do anything outside that little confined box, you’re better off  
writing your own custom javascript.

Best regards

Peter De Berdt
