search for: onupdate

Displaying 20 results from an estimated 69 matches for "onupdate".

2007 Nov 02
3
script.aculo.us: onUpdate in Sortable.create
Can''t seem to get the onUpdate to work in for a sortable list. I am following the documentation and the included functional tests but nothing is firing for me. Any idea why? Sortable.create(''list1'', { tree:true , onUpdate:function(sortable){ alert(''onUpdate'') } , handle...
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? Thanks <http://ze...
2006 Jul 20
1
Scriptaculous + Sortable: onUpdate Not Firing
...quot;> <li id="li-13">Singletary, Bob (President/CEO)</li> <li id="li-12">Chatman, Jim (Vice President of Finance/CFO)</li> ... </ul> <script type="text/javascript"> Sortable.create(''admin-list'', { onUpdate: function() { alert (''Updated!''); } }); </script> When the page loads, I can drag and drop the LI nodes, as expected. However ... the onUpdate event never seems to fire, as I never get an alert. If I change the onUpdate to onChange, it fires fine, of course each tim...
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="it...
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 up...
2006 Feb 01
1
Sortable onUpdate problem
...heir observers are destroyed but I keep gettting buggy behavior. Part of the problem is the draggable and the draggableObserver are different. So confusing! Droppables.add and Droppables.remove seem to work well. Where is Draggables.add and Draggables.remove when I need them? My idea is to use the onUpdate option of Sortables to call a function that will delete and then recreate all of the draggables and droppables with all the same options. My function and it''s various attempt statements is below. Any ideas? Thanks, Peter function homogenize(element, options){ element=$(element); Sor...
2008 Mar 20
2
onUpdate problem with div
...ve;>test 3</ div> <div id="divImage" style="float:left; cursor: move;>test 4</ div> </div> Sortable.create("puzzle", {tag:''div'',overlap:''horizontal'',constraint:false,scroll:''puzzle'',onUpdate:saveOrdering}); function saveOrdering() { alert("test"); } Now when I move 1 of the divs the divs moves in a correct way but the function saveOrdering is never fired. If I change the div tags to img tags saveOrdering is fired. Can''t I use div''s or is there an ot...
2007 Aug 29
0
sortable_element :onUpdate
...a callback after things are updated: <%= sortable_element :todoHandle, :handle => ''handle'' , :containment => [''newHandle'',''todoHandle'',''doneHandle'',''trashHandle''], :dropOnEmpty => true, :onUpdate => ??????????? %> What I would like to understand is how to define an action which may be called from onUpdate in order to resequence the tasks (in the database). Most grateful for clues. Thanks, Marc --~--~---------~--~----~------------~-------~--~----~ You received this message bec...
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 type="text/javascript"> // <![CDATA[ for(i=0;i<20;i++) { var node = Builder.node(''li'', ''element''+i); $(''secondli...
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", {handle:''handle'',tag:''div'',onUpdate: function(element) { new save_order(issueId,Sortable.serialize(element)); }}); Please let me know if...
2006 Mar 03
8
How to use the sortable_element tagname option?
...;, :action => ''reorder'' }) %> I see that the JavaScript debugger is complaining that "tr is not defined" because the above code gets translated to: <script type="text/javascript"> //<![CDATA[ Sortable.create(''item-list-body'', {onUpdate:function(){new Ajax.Request(''/Item/reorder'', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize(''item-list-body'')})}, tagname:tr}) //]]> </script> How can I get the tagname:tr to be tagname:''tr'' (I assume this is the p...
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
2007 Jul 19
1
Storing order of sortable objects in RoR
...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 function. I am not sure how to pass the order of the lists as parameters so that the controller''s action can update the position. Below is the related code. <script type="text/javascript" language="javascript"> // <![CDATA[ Sortable.create(&quot...
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'', {onComplete:function(request){new Effect.Highlight(''list'',{});}, parameters:Sortable.serialize(''list''), evalScripts:true, asynchronous:true})}})</script> When I...
2006 Jun 14
0
Bad behaviour in Internet Explorer
...I</div> <div id="item_1308" >&nbsp;&nbsp;&nbsp;Galeria</div> <div id="item_1309" >&nbsp;&nbsp;&nbsp;Casa</div> </div> <script type="text/javascript"> //<![CDATA[ Sortable.create("list[2]", {onUpdate:function(){new Ajax.Updater(''notice'', ''/admin/order'', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list[2]",{});}, parameters:Sortable.serialize("list[2]")})}, tag:''div''}) //]]&...
2006 Apr 05
1
Nuby Sortable Question? How do you pass multiple lists back to the server
...e 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 Ajax.Request(''/tasklist/noop/101'',... parameters:Sortable.serialize(''task-list101'') If you are dragging between two lists, how do you pass both back? (or does the onUpdate get called twice (once for each list?)) What if you wanted to pass all th...
2006 Mar 29
0
MaxConnections in IE and Ajax.Request/Sortable
Hi all, IƤve built some functionality in a CMS where you can drag and drop small elements on the page between 2+ panes/containers/divs. Whenever a drag-drop event has occurred (onUpdate) I make a Ajax.Request to save the new layout in the CMS. The code is as follows: in an onload-function: var a = ["subcontent", "main"]; for (var i=0; id=a[i]; i++) { if ($(id)) { Sortable.create(id, { only: [''PEti'',''PElist...
2006 Mar 30
4
possible scriptaculous bug
...This is a new task </li> </ul> <script type="text/javascript"> //<![CDATA[ Sortable.create(''task-list101'', {constraint:false, containment:[''task-list101'',''task-list102''], onUpdate:function(){new Ajax.Request(''/tasklist/noop/101'', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize(''task-list101'')})}}) //]]> </script> Pat <ul class=''sortable-list'' id=''task-list102'&...
2006 Jul 17
1
sortable_element - Altering defaults set by rails
...rouble is that rails generates this (repeats the parameters): <script type="text/javascript"> //<![CDATA[ Sortable.create("categoryartworks", {constraint:false, containment:[''categoryartworks'',''unlinkedartworks''], dropOnEmpty:true, onUpdate:function(){new Ajax.Request(''/admin/category/1/order?category=5'', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("categoryartworks")})}, parameters:Sortable.serialize("categoryartworks")}) //]]> </script> <script type="...