Ajax call not being made on a Sortable list


#1

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


#2

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


#3

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


#4

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