Displaying 20 results from an estimated 300 matches similar to: "script.aculo.us: onUpdate in Sortable.create"
2005 Aug 02
3
Scriptaculous: Sortable (dragdrop.js) onUpdate
Hi all,
In the following code, it doesn''t look like the onUpdate() event is firing.
Am I doing something wrong?
<ul id="testSort">
<li id="item1">item 1</li>
<li id="item2">item 2</li>
<li id="item3">item 3</li>
<li id="item4">item 4</li>
<li id="item5">item
2006 Jul 20
1
Scriptaculous + Sortable: onUpdate Not Firing
Hello all,
I''m using Scriptaculous 1.6.1 on a project I''m developing. My
generated HTML (generated by PHP) looks something like this:
<ul id="admin-list">
<li id="li-13">Singletary, Bob (President/CEO)</li>
<li id="li-12">Chatman, Jim (Vice President of Finance/CFO)</li>
...
</ul>
<script
2006 Apr 14
1
Problems using Sortable with an onUpdate callback
Hi all:
I''m using sortable (very cool stuff!) on a series of divs with an
onUpdate callback. Everything appears to work alright until I try to
pass a parameter to my callback function like this:
Sortable.create( ''page_33'',
{
tag: ''div'',
onUpdate: updateOrder(''page_33'')
}
);
When I pass that parameter to the
2006 Mar 20
5
Sortabls onUpdate function
I have this code.
<script type="text/javascript">
Sortable.create(''orderable'', {onUpdate: doAlert});
function doAlert() {
alert("Hello");
}
</script>
But when I move an item it doesn''t fire the doAlert command, am I
missing something?
2008 Mar 20
2
onUpdate problem with div
I hav the following code:
<div id="puzzle">
<div id="divImage" style="float:left; cursor: move;>test 1</
div>
<div id="divImage" style="float:left; cursor: move;>test 2</
div>
<div id="divImage" style="float:left; cursor: move;>test 3</
div>
<div
2006 Feb 01
1
Sortable onUpdate problem
Hi,
I have two sortables with different options (but same tags. just
''li''). When I drag an item from sortable1 to sortable2 I want it to
gain the options that the sortable2 items have.
I''ve tried all day to understand how Draggables and their observers
are destroyed but I keep gettting buggy behavior. Part of the problem
is the draggable and the draggableObserver are
2007 Aug 29
0
sortable_element :onUpdate
First time poster - hope I''ve done sufficient homework to get more than an
rtfm:
In my view, I have a <ul> list wherein each list element is identified with
an id, thusly:
<ul id="todoHandle">
<% for task in @tasks %>
<li id="task_<%=task.id%>">
<%= task.Description %>
</li>
<% end %>
2006 Feb 14
5
problem with sortable lists and IE
* I sent this message previously from the wrong address so it didn''t go
through so, I apologize in advance if a duplicate shows up *
Hello, I am very new to script.aculo.us and prototype but was trying to
implement some of the cool ajax functionality with Webwork.
I have been having a little trouble with the sortable element demo. I have
the following code below:
<html>
2005 Aug 18
5
Sortable > how to know wich elementID was dropped ?
Maybe a newb question, maybe not.
It''s not well documented, and I want to know how to know the id of my
newly dropped item.
The usage, would be to attach the newly dropped id to its *new* parent in
a DB.
Thanks.
????????????????????????
http://www.samueldr.com
http://www.hostingquebec.ca
2006 Jan 24
8
scriptaculous sortable
Hi,
maybe I am using this the wrong way but I have a list as follows
<ul id="secondlist">
<li>bla bla</li>
<li> bla bla </li>
</ul>
and then I add dynamically further <li> elements and create a Sortable
but the onUpdate only fires for <li> items that have not been created
via Javascript.
Any clues?
<script
2005 Jul 08
3
Problem with script.aculo.us 1.0
I just upgraded to the new version and now my storable containers are
not working. here is my code.
Sortable.create("leadstories",
{handle:''handle'',tag:''div'',containment:''leadstories'',onUpdate:
function(element) { new save_order(issueId,Sortable.serialize(element));
}});
Sortable.create("rightnav",
2006 May 19
6
Multiple dynamic Sortables
I''m writing an appliation that contains several dynamically created lists. I
had hoped that the following method for using the Sortable library from
scriptaculous would work:
1) create the list
2) create a Sortable for it
3) create another list
4) create a Sortable for it
and so on. Unfortunately this doesn''t work. I can''t find any info in the
documentation for
2006 Mar 03
8
How to use the sortable_element tagname option?
I''m having some difficulty adding drag-and-drop sorting to my
application. I''m hoping that someone can help me figure out what I''m
doing wrong:
#view
<table>
...
<tbody id="item-list-body">
<tr id="view-item-<%= item.id %>"....</tr>
</tbody>
...
<%= sortable_element(''item-list-body'',
2006 Aug 03
6
creating a recycle-bin
Hi all,
I''m trying to create a recycle bin for elements from a Sortable. To do
that I created an <img> (image of a recycle-bin ofcourse) and made it
a Droppable. However what should I do with the element in the onDrop
function of the Droppable to stop it from going back into the
Sortable? How do I remove it altogether from the page?
thanks and regards,
Jeroen
2006 Feb 27
4
Getting nuts with sortables...
Folks,
It has been a whole day spent on this but I still can''t get my mind
around the most probably very stupid/basic mistake here... First, the
code I use:
<h3>List A</h3>
<ul id="lista" >
<li id="item1"> Item 1</li>
<li id="item2"> Item 2</li>
<li id="item3"> Item 3</li>
</ul>
2007 Jul 19
1
Storing order of sortable objects in RoR
I have two sortable lists that you can drag and drop to and from. Each
object in the lists have a position field in the object''s table. I
want to be able to update the position in the database automagically
once a user has sorted the list.
I can drag and drop just fine but I am not able to store the new
positions in the database.
I am trying to use Ajax.request in the onUpdate callback
2006 Mar 30
4
possible scriptaculous bug
I have two sortable lists, one after the other. I can drag from the first
to the second but not from the second to the first. The behavior is
consistent if n > 2. For example, I can drag from 1 to 2, 3 or 4 from 2 to
3 or 4 and from 3 to 4, but not in the reverse order: I can''t drag from the
4th list to anything (besides itself). From the third list I can drag only
to itself and 4.
2006 Jan 30
5
RE: sortable list question
Assuming that $(ids[i]) is the hidden input field, wouldn''t the
following line need to reference it as a form element?
> $(ids[i]).innerHTML = i;
I would assume it should be (the "'''' + " makes it a string, not sure if
you can set a form element value to an int, maybe you can):
$(ids[i]).value = '''' + i;
Or maybe I''m not
2006 Apr 05
1
Nuby Sortable Question? How do you pass multiple lists back to the server
I have multiple drag and drop lists. If you sort within one list, you can
pass the list back to the server using:
<%= sortable_element ''task-list'' << person.id.to_s ,
:url => { :action => "noop", :id => @user },
...
%>
Which causes this to be included in the javascript:
onUpdate:function(){new
2005 Dec 11
1
redering CDATA wierdness
I am attempting to do the sortable_element tutorial from scriptaculous.
(http://demo.script.aculo.us/ajax/sortable_elements)
Upon viewing the script.aculo.us source, I see this line is generated...
<script type="text/javascript">Sortable.create(''list'',
{onUpdate:function(){new Ajax.Updater(''list-info'', ''/ajax/order'',