# Ajax call not being made on a Sortable list

**URL:** <https://www.ruby-forum.com/t/ajax-call-not-being-made-on-a-sortable-list/94128>\
**Category:** Rails\
**Created:** [April 22, 2006, 3:09am UTC](https://www.ruby-forum.com/t/ajax-call-not-being-made-on-a-sortable-list/94128 "2006-04-22T03:09:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![psethi2000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b3f665/32.png) [@psethi2000](https://www.ruby-forum.com/u/psethi2000)\
**Post date:** [April 22, 2006, 3:09am UTC](https://www.ruby-forum.com/t/ajax-call-not-being-made-on-a-sortable-list/94128/1 "2006-04-22T03:09:55Z")

</div>

Hi,

I am creating a sortable list using this code:

\<%= sortable\_element(“fields\_list”,  
:url =\> { :action =\> “order”, :id =\> @fields\_list })  
%\>

it creates a sortable and I can move elements up and down, but it is not  
making any call to the “order” method.

I do not see any log activity in the development log nor do I see any  
errors there. The server log only doesn’s show any activity.

However for all other calls, I see messages in the log.

What am I missing here, any help would be appreciated.

Thanks,

Pradeep

---

<div class="post-metadata">

**Author:** ![psethi2000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b3f665/32.png) [@psethi2000](https://www.ruby-forum.com/u/psethi2000)\
**Post date:** [April 22, 2006, 5:46am UTC](https://www.ruby-forum.com/t/ajax-call-not-being-made-on-a-sortable-list/94128/2 "2006-04-22T05:46:09Z")

</div>

Have you checked for javascript errors?

Do you have

\<%= javascript\_include\_tag “prototype” %\>

in your layout?

Pradeep S. wrote:

> Hi,
> 
> I am creating a sortable list using this code:
> 
> \<%= sortable\_element(“fields\_list”,  
> :url =\> { :action =\> “order”, :id =\> @fields\_list })  
> %\>
> 
> it creates a sortable and I can move elements up and down, but it is not  
> making any call to the “order” method.
> 
> I do not see any log activity in the development log nor do I see any  
> errors there. The server log only doesn’s show any activity.
> 
> However for all other calls, I see messages in the log.
> 
> What am I missing here, any help would be appreciated.
> 
> Thanks,
> 
> Pradeep

---

<div class="post-metadata">

**Author:** ![psethi2000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b3f665/32.png) [@psethi2000](https://www.ruby-forum.com/u/psethi2000)\
**Post date:** [April 24, 2006, 5:18am UTC](https://www.ruby-forum.com/t/ajax-call-not-being-made-on-a-sortable-list/94128/3 "2006-04-24T05:18:33Z")

</div>

Yes, I do have included “prototype”. I do not see any JS errors on the  
page.

Again, the sortable list is created and I can move elements up/down, but  
the AJAX call is not made to action “order” after I re-sort the list.

Thanks,

John R. wrote:

> Have you checked for javascript errors?
> 
> Do you have
> 
> \<%= javascript\_include\_tag “prototype” %\>
> 
> in your layout?
> 
> Pradeep S. wrote:
> 
> > Hi,
> > 
> > I am creating a sortable list using this code:
> > 
> > \<%= sortable\_element(“fields\_list”,  
> > :url =\> { :action =\> “order”, :id =\> @fields\_list })  
> > %\>
> > 
> > it creates a sortable and I can move elements up and down, but it is not  
> > making any call to the “order” method.
> > 
> > I do not see any log activity in the development log nor do I see any  
> > errors there. The server log only doesn’s show any activity.
> > 
> > However for all other calls, I see messages in the log.
> > 
> > What am I missing here, any help would be appreciated.
> > 
> > Thanks,
> > 
> > Pradeep

---

<div class="post-metadata">

**Author:** ![psethi2000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b3f665/32.png) [@psethi2000](https://www.ruby-forum.com/u/psethi2000)\
**Post date:** [April 24, 2006, 11:56am UTC](https://www.ruby-forum.com/t/ajax-call-not-being-made-on-a-sortable-list/94128/4 "2006-04-24T11:56:39Z")

</div>

Always a good idea to check the log file for Ajax errors 🙂
