[Proto-Scripty] Re: Problem with Ajax.Updater...
make that 2 typos ! - Original Message - From: Rick Waldron To: prototype-scriptaculous@googlegroups.com Sent: Tuesday, June 02, 2009 10:01 PM Subject: [Proto-Scripty] Re: Problem with Ajax.Updater... I noticed you're missing a comma... var myAjax = new Ajax.Updater(target, url, {method: 'post', parameters: { params: pars } onComplete:function(){ Between { params: pars } onComplete (should be right before onComplete) That may be unrelated, but an observation worth noting. On Tue, Jun 2, 2009 at 4:47 PM, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Guys, you're talking past each other. @Alex: This is perfectly valid: var x = one=1two=2three=3; new Ajax.Updater(target, url, {parameters: x}); @OP: This is perfectly valid (and preferred): new Ajax.Updater(target, url, { parameters: { 'one':1, 'two':2, 'three': 3 } }); -- T.J. On Jun 2, 9:37 pm, partypeopl...@gmail.com partypeopl...@gmail.com wrote: ok, I tried your suggestion but this doesn't work at all have you ever tried the syntax you are suggesting? Because I think it's wrong... Caught also in FF's error console as: Error: missing } after property list Source File: Line: 52, Column: 94 Source Code: var myAjax = new Ajax.Updater(target, url, {method: 'post', parameters: { params: pars } onComplete:function(){ and indicating exactly the parameters string, as to say you cannot open a bracket there, unless you close the previous one However, putting a trailing coma after the parameters corrects this syntax error, and everything works again Nevertheless, IE denies to deliver, even using this syntax :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Problem with Ajax.Updater...
I was not suggesting that at all - Original Message - From: partypeopl...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, June 03, 2009 1:06 AM Subject: [Proto-Scripty] Re: Problem with Ajax.Updater... @T.J. I didn't say it's not valid, but Alex was suggesting to omit the comma before onComplete, which is not valid. I tried step #3, but in a very smaller scale and it works. I can't add all the code needed to replicate, this would take pages! @Rick That's what I was trying to say to Alex too ;) UPDATE: After a lot of trial--error approach, I found out what's going on: IE executes the Ajax call, processes the PHP file, but does NOT display anything on screen! Nothing echoed, or printed in the PHP file gets displayed on the div (target='hidden-div), nor the onComplete alert gets displayed on the screen! BUT, all MySQL calls are working, I added some code to add and/or delete some foobar records on my database and they all worked! Isn't that strange? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Nested Ajax Requests
Hi, I tried to nest ajax requests. I think this should be possible, but just the outer is executed properly. The script is working till the update in the onComplete function. The ajax.updater is not started. Firebug has no network activity and nothing happens. Any idea where the error is? Probably I am just too blind. Thanks in advance Tobias new Ajax.Request(commentAjaxPath+comments.ajax.php5, { method: post, parameters: { get: saveComment, senderName: $F('senderName'), senderEmail: $F('senderEmail'), text: $F('text'), recaptcha_challenge: Recaptcha.get_challenge(), recaptcha_response: Recaptcha.get_response(), pageFeatureID: $F('pageFeatureID'), sendNotification: $F('sendNotification') }, onComplete: function(transport) { if(Object.isString(transport.responseText)) { $('comment_div').update(transport.responseText); new Ajax.Updater('comments', commentAjaxPath+'comments.ajax.php5', { parameters: { get: showComments, pageFeatureID: $F('pageFeatureID') } }); } } }); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: How do I access 'this' from within Ajax.Request onSuccess?
Hi, Via Function#bind[1], more here[2]. Or you can just use a straight- forward closure[3], like this: loadItemsFromUrl: function(url) { var self = this; new Ajax.Request(url, { method: 'get', onSuccess: function(transport) { // Here, 'self' references the instance, so: if (transport.responseJSON transport.responseJSON.items) { self.items = transport.responseJSON.items; } } }); } Whether to use Function#bind or a closure depends on your needs. If you're already defining the function inline (as in your example), you're already creating a closure and so you may as well get the benefit of it. :-) But if the function you're calling is defined elsewhere and you're just referencing it, like so: loadItemsFromUrl: function(url) { var self = this; new Ajax.Request(url, { method: 'get', onSuccess: theFunction }); } ...then you're not creating a closure in that location and so I'd probably use Function#bind: loadItemsFromUrl: function(url) { var self = this; new Ajax.Request(url, { method: 'get', onSuccess: theFunction.bind(this) }); } ...because the closure Function#bind creates for you has low overhead. [1] http://prototypejs.org/api/function/bind [2] http://proto-scripty.wikidot.com/prototype:tip-using-an-instance-method-as-a-callback-or-event-handler [3] http://blog.niftysnippets.org/2008/02/closures-are-not-complicated.html HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jun 2, 9:48 pm, Col col.w.har...@gmail.com wrote: I'm a little confused about context and how to access things correctly when my ajax request onSuccess function runs. My code currently looks something like this: var MyObject = Class.create({ initialize: function() { this.items = []; }, loadItemsFromUrl: function(url) { new Ajax.Request(url, { method: 'get', onSuccess: function(transport) { // how can I access 'this.items' from here ??? } }); } }); var myObject = new MyObject(); myObject.loadItemsFromUrl('http://www.blah.com/items'); I realise that 'this' will not actually point to the instance of myObject when the callback is run but how CAN I access it ? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] The parameter data getting fixed in Ajax.PeriodicalUpdater
Hello, I have tried Ajax.PeriodicalUpdater function and as passed the parameter using post method, the parameter value is getting fixed. I am passing the data with variables and every time instead of getting the data from variable it is picking the first time value, the junk. and there is no means provided to make it dynamic. We do not use this just to get data but to submit dynamic data other wise it is loosing its requirement. finally have done this via putting timer with ajax.updater. Thanks Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Vertical menu with scrolls on top and bottom
Hi, I'm trying to create a vertical menu (using Protoaculous) with flyouts that would have top and bottom scrolling buttons rather than a horizontal scrollbar - similar to what YUI provides (example at http://yuiblog.com/sandbox/yui/v260/examples/menu/example13.html). I've been trying to look for a protoype plugin that provides an out of the box menu implementation, but have not been able to find one that has these scroll buttons. Has anyone worked on a similar feature in past, or knows about any plugin that can achieve the same? Any help would be great here. Thanks, Nikhil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Vertical menu with scrolls on top and bottom
hi nikhil, you might wanna take a look at http://livepipe.net/control there is a scrollbar control that you might adjust for your needs. -- mona On Wed, Jun 3, 2009 at 7:15 AM, Nikhil nikhilsa...@gmail.com wrote: Hi, I'm trying to create a vertical menu (using Protoaculous) with flyouts that would have top and bottom scrolling buttons rather than a horizontal scrollbar - similar to what YUI provides (example at http://yuiblog.com/sandbox/yui/v260/examples/menu/example13.html). I've been trying to look for a protoype plugin that provides an out of the box menu implementation, but have not been able to find one that has these scroll buttons. Has anyone worked on a similar feature in past, or knows about any plugin that can achieve the same? Any help would be great here. Thanks, Nikhil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Nested Ajax Requests
hi Tobias, I advise you to add an onException handler to the outer Ajax.Request as the default exception handler silently eats any error thrown in the other handlers. This way you'll have more insight why the Ajax.Updater is failing. cheers -- mona On Wed, Jun 3, 2009 at 9:21 AM, majestixx majestixx...@gmail.com wrote: Hi, I tried to nest ajax requests. I think this should be possible, but just the outer is executed properly. The script is working till the update in the onComplete function. The ajax.updater is not started. Firebug has no network activity and nothing happens. Any idea where the error is? Probably I am just too blind. Thanks in advance Tobias new Ajax.Request(commentAjaxPath+comments.ajax.php5, { method: post, parameters: { get: saveComment, senderName: $F('senderName'), senderEmail: $F('senderEmail'), text: $F('text'), recaptcha_challenge: Recaptcha.get_challenge(), recaptcha_response: Recaptcha.get_response(), pageFeatureID: $F('pageFeatureID'), sendNotification: $F('sendNotification') }, onComplete: function(transport) { if(Object.isString(transport.responseText)) { $('comment_div').update(transport.responseText); new Ajax.Updater('comments', commentAjaxPath+'comments.ajax.php5', { parameters: { get: showComments, pageFeatureID: $F('pageFeatureID') } }); } } }); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Revert sortable on return value true? Possible?
can you post the errors so i can see whats happening - Original Message - From: terry-5- nathaliesteinf...@gmx.net To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Tuesday, June 02, 2009 9:20 PM Subject: [Proto-Scripty] Re: Revert sortable on return value true? Possible? Thanks Alex. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Nested Ajax Requests
Thanks for the advice. I now got it running. On 3 Jun., 11:01, Mona Remlawi mona.reml...@gmail.com wrote: hi Tobias, I advise you to add an onException handler to the outer Ajax.Request as the default exception handler silently eats any error thrown in the other handlers. This way you'll have more insight why the Ajax.Updater is failing. cheers -- mona On Wed, Jun 3, 2009 at 9:21 AM, majestixx majestixx...@gmail.com wrote: Hi, I tried to nest ajax requests. I think this should be possible, but just the outer is executed properly. The script is working till the update in the onComplete function. The ajax.updater is not started. Firebug has no network activity and nothing happens. Any idea where the error is? Probably I am just too blind. Thanks in advance Tobias new Ajax.Request(commentAjaxPath+comments.ajax.php5, { method: post, parameters: { get: saveComment, senderName: $F('senderName'), senderEmail: $F('senderEmail'), text: $F('text'), recaptcha_challenge: Recaptcha.get_challenge(), recaptcha_response: Recaptcha.get_response(), pageFeatureID: $F('pageFeatureID'), sendNotification: $F('sendNotification') }, onComplete: function(transport) { if(Object.isString(transport.responseText)) { $('comment_div').update(transport.responseText); new Ajax.Updater('comments', commentAjaxPath+'comments.ajax.php5', { parameters: { get: showComments, pageFeatureID: $F('pageFeatureID') } }); } } }); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] When are is final 1.6.1 going to be released?
Hi all, Do you have any ETA on the final version of 1.6.1? IE8 is being force- fed by Microsoft and is starting to show usage for some of our customers. Thx. .K --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: OverLIB Clone - IE not appending to Style Tag - setStyle() sometimes not working
Thanks Walter, I have noticed some varied usage of 'quoted' and unquoted, and some reports that some 'names' must be quoted and others work fine unquoted... in particular 'float' must be quoted to work at all.. Seems like odd behaviour to me Thanks Colin, I think its time for me to organise sime spectacles. It was a loing week at the Laptop screen... Yes, I wanted to use a shortcut method to get IE writing to the style tag.. Unfortunatly the code for IE does not work for Firefox.. From -- www.rule52.com/ var CSSRules = function() { var headElement = document.getElementsByTagName(head)[0], styleElement = document.createElement(style); styleElement.type = text/css; headElement.appendChild(styleElement); // memoize the browser-dependent add function var add = function() { // IE doesn't allow you to append text nodes to style elements if (styleElement.styleSheet) { return function(selector, rule) { // IE Method if (styleElement.styleSheet.cssText == '') { styleElement.styleSheet.cssText = ''; } styleElement.styleSheet.cssText += selector + { + rule + }; } } else { return function(selector, rule) { // Firefox and Co.. styleElement.appendChild(document.createTextNode(selector + { + rule + })); } } }(); return { add : add } A long way for a short job!! I might try messing with the $$(CSS) method when the weekend comes along and see if I can get something happening.. Thanks for the responses.. Regards, Gilbert R On Jun 3, 12:07 am, ColinFine colin.f...@pace.com wrote: On Jun 2, 1:37 pm, IMBI-Indie-Portal imbil...@tpg.com.au wrote: Thanks Colin, but, there is a space, if you check the source code page, It didn't fit to well into the post. As you can see, it works as a HTMLDOM style, almost the same code.. border: this.olc_divborder+'px' +this.olc_bordercol+ 'solid' there is one space on each side. There is not. There is a space *outside* the quotes, but not one that will go into the string which you are generating. This will pass an object like { border: '222pxblacksolid' } The way I read it from the DOCS is that if it works as a HTMLDOM shorthand method, it should work in setStyle(); ??? Yes. But the shorthand property has a different name from the individual property. You appeared to be trying to say { backgroundImage: 'url(xxx) top left' } instead of { background: 'url(xxx) top left' } or { backgroundImage: 'url(xxx)', backgroundPosition: 'top left' } I don't know about the appendChild problem.http://www.phpied.com/dynamic-script-and-style-elements-in-ie/gives a solution, but I think you know this and are asking about whether Prototype helps with it or not, and I don't know the answer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: OverLIB Clone - IE not appending to Style Tag - setStyle() sometimes not working
Well, float is a kind of Number, so that's why you can't use that word directly -- it's reserved by JavaScript, and 'you have to dance with who brung ya'. In those cases, you can usually use css[the word] as a substitute, so cssFloat in this case, if you want to use the bare camelCase words. Walter On Jun 3, 2009, at 7:48 AM, IMBI-Indie-Portal wrote: Thanks Walter, I have noticed some varied usage of 'quoted' and unquoted, and some reports that some 'names' must be quoted and others work fine unquoted... in particular 'float' must be quoted to work at all.. Seems like odd behaviour to me --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: OverLIB Clone - IE not appending to Style Tag - setStyle() sometimes not working
But to reiterate, the key here is to pick one format for the entire hash, and stick to it. Prototype sniffs the first element in the hash to figure out which method to use all the rest of the way through the rest of the hash. This is done for performance reasons. Walter On Jun 3, 2009, at 9:06 AM, Walter Lee Davis wrote: if you want to use the bare camelCase words. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: The parameter data getting fixed in Ajax.PeriodicalUpdater
Hello SKalra. Nobody can debug your problem without seeing any code. My guess is that the way your are writing it, the value you are passing for the parameter is being evaluated only once, when you create the PeriodicalUpdater, and is thereafter a constant as far as the Updater is concerned; but without seeing any of it I can't tell if that's anywhere near the right answer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Revert sortable on return value true? Possible?
Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1921, Column: 39 Source Code: if (match = source.match(pattern)) { Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 285, Column: 60 Source Code: if (result = !!(iterator || Prototype.K)(value, index)) . (left some out here) Warning: variable methods redeclares argument Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1121, Column: 8 Source Code: var methods = Element.Methods, cache = Element.extend.cache; Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1290, Column: 66 Source Code: while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) { . (left some out here) Warning: anonymous function does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1500, Column: 17 Source Code: }).join(''); Warning: variable element redeclares argument Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1757, Column: 8 Source Code: var element = $(element); Warning: anonymous function does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1885, Column: 27 Source Code: }, Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1916, Column: 41 Source Code: } while (element = element.parentNode); Warning: assignment to undeclared variable ObjectRange Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 553 Warning: redeclaration of property clone Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1921 Warning: anonymous function does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/builder.js Line: 73, Column: 12 Source Code: return element; Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/effects.js Line: 50, Column: 52 Source Code: if (opacity = Element.getStyle(element, 'opacity')) Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/effects.js Line: 52, Column: 90 Source Code: if (opacity = (Element.getStyle(element, 'filter') || '').match(/ alpha\(opacity=(.*)\)/)) Warning: reference to undefined property o[eventName] Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/dragdrop.js Line: 198` Warning: anonymous function does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/dragdrop.js Line: 540, Column: 40 Source Code: return Sortable.sortables[element.id]; Warning: function gettrailobjnostyle does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/searchover.js Line: 29, Column: 20 Source Code: } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: High performance replacement of html elements
Hi Walter and david, thanks for your input. @Walter: Maybe I gave a wrong impression. I am already doing it like you suggested. I go even further: the current status of the sorted list will only be saved when the user clicks a button I am done sorting, save this. In my case it wouldn't be good to save the sort order via ajax. The only thing what I need to to while sorting the list is to change value, name and options of an additional select box that is included in each sortable li. I figured out how to change these select-boxes with a better performance. First of all and most importantly only these select boxes are changed that needs to be changed. The second mistake was that I always created a new select box instead of just altering the old one. This also helped a lot. I found out that Sortable.create also has problems with lists containing 500 elements. I turned off Sortable when lists that big occur. On 28 Mai, 15:29, Walter Lee Davis wa...@wdstudio.com wrote: I think you need to take a step back and think about what you're doing here. If you use Sortable to re-order a list, that list will stay ordered (in the visitor's view) precisely as they have dragged it. There is no need to re-populate the visitor's list with the new order, because the order is set there already. (Which is why it's so fast -- you're not actually doing anything dramatic, just changing the order of existing elements.) Each time you change a Sortable, the onUpdate function (if present) is fired. Use that to send an Ajax request back to the server and update the database, but don't actually pull anything else back from the server. Keep the current view of the page and the database loosely coupled like this and you will realize enormous performance gains. If you follow this design pattern, then you will have the best of both worlds -- high performance AND database-backed state. At any point (assuming your onUpdate-driven POST goes through quickly enough) reloading the page should show you the very same list in the very same order as the drag-resorted-but-not-reloaded view you were just looking at. Walter On May 28, 2009, at 6:34 AM, david wrote: Hi Cyrus, I think you should try a simple $('element').innerHTML='the new value'; for each element to update Compared to js solution, it's quicker. Of course it depend to what you'll need to insert or change. -- david On 28 mai, 11:52, Cyrus arianglan...@googlemail.com wrote: Hi, I am using Sortable to sort potentially long lists of 100+ elements. Sortable itselfs works fast. Each list item contains a select-box with its position. We want to keep that select box to have a non-js fallback to sort the list. After each dragdrop the whole list has to be updated. I have to change value, name and options of each select box. I am doing this by creating new html-code and using Element.replace() to exchange the html. This is unfortunately very slow. I also tried to use insert() and then remove() but it doesn't really work faster. Any suggestions? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Revert sortable on return value true? Possible?
sorry i cant read the = signs ... are they 3 equals ( = = =) or 2 (= =) - obviously without spaces !! - Original Message - From: terry-5- nathaliesteinf...@gmx.net To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, June 03, 2009 3:23 PM Subject: [Proto-Scripty] Re: Revert sortable on return value true? Possible? Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1921, Column: 39 Source Code: if (match = source.match(pattern)) { Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 285, Column: 60 Source Code: if (result = !!(iterator || Prototype.K)(value, index)) . (left some out here) Warning: variable methods redeclares argument Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1121, Column: 8 Source Code: var methods = Element.Methods, cache = Element.extend.cache; Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1290, Column: 66 Source Code: while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) { . (left some out here) Warning: anonymous function does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1500, Column: 17 Source Code: }).join(''); Warning: variable element redeclares argument Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1757, Column: 8 Source Code: var element = $(element); Warning: anonymous function does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1885, Column: 27 Source Code: }, Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1916, Column: 41 Source Code: } while (element = element.parentNode); Warning: assignment to undeclared variable ObjectRange Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 553 Warning: redeclaration of property clone Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1921 Warning: anonymous function does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/builder.js Line: 73, Column: 12 Source Code: return element; Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/effects.js Line: 50, Column: 52 Source Code: if (opacity = Element.getStyle(element, 'opacity')) Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/effects.js Line: 52, Column: 90 Source Code: if (opacity = (Element.getStyle(element, 'filter') || '').match(/ alpha\(opacity=(.*)\)/)) Warning: reference to undefined property o[eventName] Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/dragdrop.js Line: 198` Warning: anonymous function does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/dragdrop.js Line: 540, Column: 40 Source Code: return Sortable.sortables[element.id]; Warning: function gettrailobjnostyle does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/searchover.js Line: 29, Column: 20 Source Code: } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Revert sortable on return value true? Possible?
They are two, and this is just a place where Lint and Prototype disagree. This could be written as if((match = source.match(pattern))) { ... and Lint would say Sure! That's just fine! because that's like saying if (true){ But Prototype house style is about less typing (in the keyboard sense of the word) and this assignment-which-returns- either-false-or-something-truthy will actually **work** in JavaScript. Walter On Jun 3, 2009, at 11:11 AM, Alex McAuley wrote: sorry i cant read the = signs ... are they 3 equals ( = = =) or 2 (= =) - obviously without spaces !! - Original Message - From: terry-5- nathaliesteinf...@gmx.net To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, June 03, 2009 3:23 PM Subject: [Proto-Scripty] Re: Revert sortable on return value true? Possible? Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1921, Column: 39 Source Code: if (match = source.match(pattern)) { Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 285, Column: 60 Source Code: if (result = !!(iterator || Prototype.K)(value, index)) . (left some out here) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Revert sortable on return value true? Possible?
I would have to say its an error in your function but i cant see where at the moment... i will deeper investigate when i've finished what i am doing Alex - Original Message - From: terry-5- nathaliesteinf...@gmx.net To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, June 03, 2009 3:23 PM Subject: [Proto-Scripty] Re: Revert sortable on return value true? Possible? Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1921, Column: 39 Source Code: if (match = source.match(pattern)) { Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 285, Column: 60 Source Code: if (result = !!(iterator || Prototype.K)(value, index)) . (left some out here) Warning: variable methods redeclares argument Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1121, Column: 8 Source Code: var methods = Element.Methods, cache = Element.extend.cache; Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1290, Column: 66 Source Code: while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) { . (left some out here) Warning: anonymous function does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1500, Column: 17 Source Code: }).join(''); Warning: variable element redeclares argument Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1757, Column: 8 Source Code: var element = $(element); Warning: anonymous function does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1885, Column: 27 Source Code: }, Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1916, Column: 41 Source Code: } while (element = element.parentNode); Warning: assignment to undeclared variable ObjectRange Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 553 Warning: redeclaration of property clone Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/prototype.js Line: 1921 Warning: anonymous function does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/builder.js Line: 73, Column: 12 Source Code: return element; Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/effects.js Line: 50, Column: 52 Source Code: if (opacity = Element.getStyle(element, 'opacity')) Warning: test for equality (==) mistyped as assignment (=)? Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/effects.js Line: 52, Column: 90 Source Code: if (opacity = (Element.getStyle(element, 'filter') || '').match(/ alpha\(opacity=(.*)\)/)) Warning: reference to undefined property o[eventName] Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/dragdrop.js Line: 198` Warning: anonymous function does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/scriptaculous/dragdrop.js Line: 540, Column: 40 Source Code: return Sortable.sortables[element.id]; Warning: function gettrailobjnostyle does not always return a value Source File: http://tltc.la.utexas.edu/rr/js/searchover.js Line: 29, Column: 20 Source Code: } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] [OT] someone know a good book from certificates x509
Hi list, first my apologize for this off-topic, but I asked to lot people and noone can help me. Using a OpenSSL -request, and convert to p12) (in Slackware) + Windows 2003 -certificate valid againts my CA Windows - create a lot certificates. My certificates have one year before expirate -six months ago- and now need how revalidate or whatever thing I need do. So, someone know a book what explain how do it? A book covering certificates for windows? Or a book that has examples certificates for windows? Thanks a lot and my apologize again -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: [OT] someone know a good book from certificates x509
Google is your friend !! - Original Message - From: Miguel Beltran R. To: prototype-scriptaculous@googlegroups.com Sent: Wednesday, June 03, 2009 4:53 PM Subject: [Proto-Scripty] [OT] someone know a good book from certificates x509 Hi list, first my apologize for this off-topic, but I asked to lot people and noone can help me. Using a OpenSSL -request, and convert to p12) (in Slackware) + Windows 2003 -certificate valid againts my CA Windows - create a lot certificates. My certificates have one year before expirate -six months ago- and now need how revalidate or whatever thing I need do. So, someone know a book what explain how do it? A book covering certificates for windows? Or a book that has examples certificates for windows? Thanks a lot and my apologize again -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Revert sortable on return value true? Possible?
I just figured out that if I remove the event 'Update:+function call' changeClass is never executed during 'revert:changeClass'. I planted an alert statetement right before the function return statement to see what value is being returned and it doesn't execute if 'Update' is removed. So is it the revert event that is not working? Sortable.create('blank_1',{tag:'span',dropOnEmpty: true, constraint:true, containment:sections, only:'lineitem', revert:changeClass}); doesn't call changeClass function/ nothing is returned Sortable.create('blank_1',{tag:'span',dropOnEmpty: true, constraint:true, containment:sections, only:'lineitem', revert:changeClass, onUpdate:function(el){changeClass(el)}}); calles changeClass function/returns false or true. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] JSON and Ajax.Updater
var parameters = { ID : 17, Name : 'hello' }; new Ajax.Updater( td.id ,'../adicionar' ,{asynchronous:true ,parameters ,evalScripts:true ,onComplete:function(request, json) {Effect.Pulsate(td.id);} ,requestHeaders:['X-Update', td.id] } ); Does not works :( Why? Thanks, Celso. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: IE 8 Prototype Issue
Hi CMRstar430, it seems that it is a problem with lightwindow and IE8.0. have you check if a newer version exist ??? -- david On 2 juin, 22:20, CMRstar430 cmrstar...@gmail.com wrote: Hello All, I am having an issue with lightwindow in IE 8.0. http://proofs.icongraphics.com/usbe/services.asp If you go to this link in IE 8 and then click on the link in the body that says MORE, you will see what is going on. It is supposed to open up a window like any other lightwindow, light box etc... It keeps saying Error on page and when i look at the details it says it is a line in the Prototype. The error message is saying that it is on line 2254, character 9: This is that line: elementStyle[(property == 'Float' || property == 'cssFloat') ? I downloaded and used the new version of prototype: version 1.6.1_rc2 Anyone have this issue before or know a way to fix it??? Please help! Thank you, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: JSON and Ajax.Updater
Hi Celso, is it possible to have a live page with the problem ? or something that explain the error. Or even better, what you want to do and what is the error. In fact, you'll have more chance to receive an answer with plenty of details. -- david On 3 juin, 19:31, Celso cels...@gmail.com wrote: var parameters = { ID : 17, Name : 'hello' }; new Ajax.Updater( td.id ,'../adicionar' ,{asynchronous:true ,parameters ,evalScripts:true ,onComplete:function(request, json) {Effect.Pulsate(td.id);} ,requestHeaders:['X-Update', td.id] } ); Does not works :( Why? Thanks, Celso. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: IE 8 Prototype Issue
Hi again CMRstar430, I will have a glance tonight in case prototype have trouble with IE8.0. -- david On 3 juin, 19:57, david david.brill...@gmail.com wrote: Hi CMRstar430, it seems that it is a problem with lightwindow and IE8.0. have you check if a newer version exist ??? -- david On 2 juin, 22:20, CMRstar430 cmrstar...@gmail.com wrote: Hello All, I am having an issue with lightwindow in IE 8.0. http://proofs.icongraphics.com/usbe/services.asp If you go to this link in IE 8 and then click on the link in the body that says MORE, you will see what is going on. It is supposed to open up a window like any other lightwindow, light box etc... It keeps saying Error on page and when i look at the details it says it is a line in the Prototype. The error message is saying that it is on line 2254, character 9: This is that line: elementStyle[(property == 'Float' || property == 'cssFloat') ? I downloaded and used the new version of prototype: version 1.6.1_rc2 Anyone have this issue before or know a way to fix it??? Please help! Thank you, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Prototype Xml representation
Hi confiteor, could you extand a bit more what you need. I haen't understand, and seeing the number of response, it seems that I'm not the only one. -- david On 2 juin, 14:12, confiteor ziobermic...@gmail.com wrote: Hi, I try find Xml representation of Prototype library. Is something like this exist? Best regards, confi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Vertical menu with scrolls on top and bottom
Hi nikhil, have you tried scripteka.com ?? I'm not sure there is something that could fit your need, but who never knows. -- david On 3 juin, 10:53, Mona Remlawi mona.reml...@gmail.com wrote: hi nikhil, you might wanna take a look athttp://livepipe.net/control there is a scrollbar control that you might adjust for your needs. -- mona On Wed, Jun 3, 2009 at 7:15 AM, Nikhil nikhilsa...@gmail.com wrote: Hi, I'm trying to create a vertical menu (using Protoaculous) with flyouts that would have top and bottom scrolling buttons rather than a horizontal scrollbar - similar to what YUI provides (example at http://yuiblog.com/sandbox/yui/v260/examples/menu/example13.html). I've been trying to look for a protoype plugin that provides an out of the box menu implementation, but have not been able to find one that has these scroll buttons. Has anyone worked on a similar feature in past, or knows about any plugin that can achieve the same? Any help would be great here. Thanks, Nikhil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: JSON and Ajax.Updater
In FireBug: invalid object initializer [Break on this error] ,{asynchronous:true If I put it Ajax.Updater works, but my function is not generic new Ajax.Updater( td.id ,'../adicionar' ,{asynchronous:true ,parameters:{ ID : 17, Name : 'hello' } // **Attetion***// ,evalScripts:true ,onComplete:function(request, json) {Effect.Pulsate(td.id);} ,requestHeaders:['X-Update', td.id] } ); On 3 jun, 15:02, david david.brill...@gmail.com wrote: Hi Celso, is it possible to have a live page with the problem ? or something that explain the error. Or even better, what you want to do and what is the error. In fact, you'll have more chance to receive an answer with plenty of details. -- david On 3 juin, 19:31, Celso cels...@gmail.com wrote: var parameters = { ID : 17, Name : 'hello' }; new Ajax.Updater( td.id ,'../adicionar' ,{asynchronous:true ,parameters ,evalScripts:true ,onComplete:function(request, json) {Effect.Pulsate(td.id);} ,requestHeaders:['X-Update', td.id] } ); Does not works :( Why? Thanks, Celso. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: JSON and Ajax.Updater
On Wed, Jun 3, 2009 at 2:31 PM, Celso cels...@gmail.com wrote: var parameters = { ID : 17, Name : 'hello' }; new Ajax.Updater( td.id ,'../adicionar' ,{asynchronous:true ,parameters parameters is mispelled :/ you should use parameters: 'string'|{object} instead. Removing this line it might work ,evalScripts:true ,onComplete:function(request, json) {Effect.Pulsate(td.id);} ,requestHeaders:['X-Update', td.id] } ); Does not works :( Why? Thanks, Celso. -- Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: JSON and Ajax.Updater
THANKS !! On 3 jun, 16:48, Douglas douglas.gont...@gmail.com wrote: Ops! My mistake now O.o you'd use something like this: [code] var myParameters = { ID : 17, Name : 'hello' }; new Ajax.Updater( td.id ,'../adicionar' ,{ asynchronous:true ,parameters: myParameters // see? Setting Ajax.Updater.parameters as myParameters ,onComplete: function(resp, json) {/* something wild :)*/} }); [/code] Cheers. On Wed, Jun 3, 2009 at 4:43 PM, Douglas douglas.gont...@gmail.com wrote: On Wed, Jun 3, 2009 at 2:31 PM, Celso cels...@gmail.com wrote: var parameters = { ID : 17, Name : 'hello' }; new Ajax.Updater( td.id ,'../adicionar' ,{asynchronous:true ,parameters parameters is mispelled :/ you should use parameters: 'string'|{object} instead. Removing this line it might work ,evalScripts:true ,onComplete:function(request, json) {Effect.Pulsate(td.id);} ,requestHeaders:['X-Update', td.id] } ); Does not works :( Why? Thanks, Celso. -- Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense. -- Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Need Help With Ordering Sortables
I have 4 divs that are sortable and they have numbered id's. e.g list_1, list_2 etc. What I want to do is call a function when a button is pressed that will put by sortable Divs into a set order. Is this possible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Ajax.Request's getStatus and success
Hi, I have a question regarding the code in Ajax.Request. Specifically, the success and getStatus methods. Here is the code from the latest version for reference: pre code success: function() { var status = this.getStatus(); return !status || (status = 200 status 300); }, getStatus: function() { try { return this.transport.status || 0; } catch (e) { return 0 } }, /code /pre In getStatus, it looks like 0 is returned if the current transport's status is null, undefined or somehow returned as false. In the success method, the negation of the status is checked for validity; !0 evaluates to true, so if no status defined, the request is deemed successful. During a recent project, I ran a test in which I shut down my application server, and then tried to invoke an Ajax call. In Firefox 3, the underlying transport actually returned a 0 for its status, so the call was evaluated as being successful, and the corresponding callback method was invoked. Given all this, I would like to know whether a 0 status should be construed as being a successful request. I have not found any reference to it in HTTP status definitions online. Also, under what cases do transports not return any status, and are these cases also to be construed as being successful? Or...am I missing something else that is at work here? Any thoughts and insights are greatly appreciated -- thanks in advance! Cheers, Cliff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Prototype Xml representation
Hi, I want to write a Add-In for Visual Studio 2008. This Add-In would have to show the method in the Prototype class. And there is a problem. I do not want to create a static class, which would include a description of each class library Prototype. I would prefer to load all data from an XML file. Example: class name=Array method name=clear/method method name=clone/method method name=compact/method method name=each argiterator/arg /method /class The structure of the XML file can be other. Is there some way to generate these files? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Opera Chrome not fully extending Element?
Hi Joe, This may not have any bearing on your problem, but I'll ask anyway: Are you sure those are valid IDs? Because my read of the spec is that [ and ] are not valid in HTML element identifiers. The id attribute [1] is of type name[2], which ...must begin with a letter ([A-Za- z]) and may be followed by any number of letters, digits ([0-9]), hyphens (-), underscores (_), colons (:), and periods (.). [1] http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2 [2] http://www.w3.org/TR/REC-html40/types.html#type-name Does the problem still happen if you stick to IDs fitting the rules above? FWIW, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jun 3, 4:32 pm, joe t. thooke...@gmail.com wrote: Opera/Chrome Prototype 1.6.1RC The symptoms of this problem are noticeable in Opera and Chrome. i have a table, and the first cell of each row is observing click to perform an Ajax call and get a sub-table: a primitive tree-grid structure. Works fine in Firefox IE. i'm using Opera 10 (just updated to 10 beta) to debug, and here's what i'm finding: getLots:function(itemid){ var row2 = $('i2[' + itemid + ']'); if (row2.down('table')) { ... } new Ajax.Request( ... ); } This function is executing as expected, so the cells are observing correctly. However, it appears Opera is not fully extending the HTML Element on the line var row2 = $('i2[' + itemid + ']'); unless Dragonfly just isn't reporting the Prototype extended methods. Here's what Dragonfly shows for row2 after the assignment: row2 object childElementCount: 2 + firstChild: object + firstElementChild: object id: i2[48989] innerHTML: TD /TDTD colspan=3 id=il[48989]... innerText: + lastChild: object + lastElementChild: object + nextElementSibling: object + nextSibling: object + offsetParent: object outerHTML: TR id=i2[48989] style=display:none;T... outerText: + parentElement: object + parentNode: object + previousElementSibling: object + previousSibling: object rowIndex: 3 sectionRowIndex: 1 sourceIndex: 200 text: textContent: The inspection of the same object in Chrome is similar: showing the native properties and methods, but none of the Prototype extensions. So clearly, Prototype $() is returning an HTMLElement. But my function blows up on the IF statement. The function doesn't skip the IF statement to the Ajax call as though it evaluated False and moved on, it just dies on that line. Chrome throws Uncaught Error: SYNTAX_ERR: DOM Exception 12 and traces the error to prototype.js line 3339: Selector#findElements: results = $A(root.querySelectorAll(e)).map(Element.extend); Any help? -joe t. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Working outside loop, but not inside
Hey, I've got some php that's pulling entries from a table, and displaying entries as well as giving a toggle effect to some. I put in some static html to confirm that the effect is working inside the file, but inside the php code the effect doesn't work... here's a snippet: while ($count=$num_teams) { echo trtdPlayer .$count . /tdtd class='players'div onclick='Effect.toggle('blinddown1', 'slide'); return false;'span class='red'{click to reserve a player spot}/span/div div id='blinddown1'style='display:none; width:175px; height:100px; background:#FFF;'Random Text that doesn't matter/div/td/tr; $count++; } Does anyone see something that I'm missing? I'm assuming its some stupid little mistake, but I've messed with it for like 3 hours with no progress. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Working outside loop, but not inside
You have an id hardcoded to the div inside the loop - ids have to be unique on the page - I'm assuming you mean to append $count to the id instead of hardcoding the digit 1 Tom On Jun 3, 3:37 pm, craig bagley.cr...@gmail.com wrote: Hey, I've got some php that's pulling entries from a table, and displaying entries as well as giving a toggle effect to some. I put in some static html to confirm that the effect is working inside the file, but inside the php code the effect doesn't work... here's a snippet: while ($count=$num_teams) { echo trtdPlayer .$count . /tdtd class='players'div onclick='Effect.toggle('blinddown1', 'slide'); return false;'span class='red'{click to reserve a player spot}/span/div div id='blinddown1'style='display:none; width:175px; height:100px; background:#FFF;'Random Text that doesn't matter/div/td/tr; $count++; } Does anyone see something that I'm missing? I'm assuming its some stupid little mistake, but I've messed with it for like 3 hours with no progress. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Working outside loop, but not inside
That's right, yes. I tried that at one point: $count=$count+2; while ($count=$num_teams) { echo trtdPlayer .$count . /tdtd class='players'div onclick='Effect.toggle('blinddown.$count.', 'slide'); return false;'span class='red'{click to reserve a player spot}/span/ div div id='blinddown.$count.'style='display:none; width:175px; height: 100px; background:#FFF;'Random Text that doesn't matter/div/td/ tr; $count++; } However, it still wasn't working, so I decided to mess around with it and just hard-code 1 in there. In my previous experience it will toggle the first occurrence of the div id, so I was just trying to avoid potential syntax errors until I figured it out. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Working outside loop, but not inside
That's right, yes. I tried that at one point: $count=$count+2; while ($count=$num_teams) { echo trtdPlayer .$count . /tdtd class='players'div onclick='Effect.toggle('blinddown.$count.', 'slide'); return false;'span class='red'{click to reserve a player spot}/span/ div div id='blinddown.$count.'style='display:none; width:175px; height: 100px; background:#FFF;'Random Text that doesn't matter/div/td/ tr; $count++; } However, it still wasn't working, so I decided to mess around with it and just hard-code 1 in there. In my previous experience it will toggle the first occurrence of the div id, so I was just trying to avoid potential syntax errors until I figured it out...but I still have not --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Need Help With Ordering Sortables
If you know the order already, you could do something like this: var foo = $('parentList'); ['item_1','item_2','item_3'].each(function(id){ foo.insert({bottom:$(id).remove()}); }); You could also capture a snapshot of the list before any dragging is done with var original = $('parentList').select('li').pluck('id'); And then play that back the same way as the array literal above. Walter On Jun 3, 2009, at 11:41 AM, Daryl wrote: I have 4 divs that are sortable and they have numbered id's. e.g list_1, list_2 etc. What I want to do is call a function when a button is pressed that will put by sortable Divs into a set order. Is this possible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Working outside loop, but not inside
There is a much cleaner way to do this... check it out (tested and passed) This goes in script tags, or in your external js file: document.observe('dom:loaded', function () { $$('.blinders').each(function (b) { b.observe('click', function () { this.next().toggle('blinddown', 'slide'); }); }); }); And the PHP really should be written like this: ?php $count=$count+2; while ( $count = $num_teams) { ? tr tdPlayer ?php echo $count ?/td td class='players' div class=blinders red {click to reserve a player spot} /div div style='display:none; width:175px;height:100px; background:#FFF;' Random Text that doesn't matter /div /td /tr ?php $count++; } ? Notice only ONE var is echo'ed. with all those double quotes your asking PHP to eval everything inside it, even when there are no vars to parse - thats not fair to PHP. Having inline handlers is something you will vastly regret in the future, so i did away with those and let the .each() deal with assigning behaviours Tested in FF3 IE 7 Rick $count=$count+2; while ($count=$num_teams) { echo 'trtdPlayer .$count . /tdtd class='players'div onclick='Effect.toggle(' blinddown.$count.', 'slide'); return false;'span class='red'{click to reserve a player spot}/span/ div div id='blinddown.$count.'style='display:none; width:175px; height: 100px; background:#FFF;'Random Text that doesn't matter/div/td/ tr; $count++; } On Wed, Jun 3, 2009 at 7:13 PM, craig bagley.cr...@gmail.com wrote: That's right, yes. I tried that at one point: $count=$count+2; while ($count=$num_teams) { echo trtdPlayer .$count . /tdtd class='players'div onclick='Effect.toggle('blinddown.$count.', 'slide'); return false;'span class='red'{click to reserve a player spot}/span/ div div id='blinddown.$count.'style='display:none; width:175px; height: 100px; background:#FFF;'Random Text that doesn't matter/div/td/ tr; $count++; } However, it still wasn't working, so I decided to mess around with it and just hard-code 1 in there. In my previous experience it will toggle the first occurrence of the div id, so I was just trying to avoid potential syntax errors until I figured it out...but I still have not --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Working outside loop, but not inside
Oh yeah... and this was your problem; onclick='Effect.toggle('blinddown1', 'slide'); return false;' would've worked as: onclick=Effect.toggle('blinddown1', 'slide'); return false; You cant use single quotes inside of single quotes. On Thu, Jun 4, 2009 at 12:37 AM, Rick Waldron waldron.r...@gmail.comwrote: There is a much cleaner way to do this... check it out (tested and passed) This goes in script tags, or in your external js file: document.observe('dom:loaded', function () { $$('.blinders').each(function (b) { b.observe('click', function () { this.next().toggle('blinddown', 'slide'); }); }); }); And the PHP really should be written like this: ?php $count=$count+2; while ( $count = $num_teams) { ? tr tdPlayer ?php echo $count ?/td td class='players' div class=blinders red {click to reserve a player spot} /div div style='display:none; width:175px;height:100px; background:#FFF;' Random Text that doesn't matter /div /td /tr ?php $count++; } ? Notice only ONE var is echo'ed. with all those double quotes your asking PHP to eval everything inside it, even when there are no vars to parse - thats not fair to PHP. Having inline handlers is something you will vastly regret in the future, so i did away with those and let the .each() deal with assigning behaviours Tested in FF3 IE 7 Rick $count=$count+2; while ($count=$num_teams) { echo 'trtdPlayer .$count . /tdtd class='players'div onclick='Effect.toggle(' blinddown.$count.', 'slide'); return false;'span class='red'{click to reserve a player spot}/span/ div div id='blinddown.$count.'style='display:none; width:175px; height: 100px; background:#FFF;'Random Text that doesn't matter/div/td/ tr; $count++; } On Wed, Jun 3, 2009 at 7:13 PM, craig bagley.cr...@gmail.com wrote: That's right, yes. I tried that at one point: $count=$count+2; while ($count=$num_teams) { echo trtdPlayer .$count . /tdtd class='players'div onclick='Effect.toggle('blinddown.$count.', 'slide'); return false;'span class='red'{click to reserve a player spot}/span/ div div id='blinddown.$count.'style='display:none; width:175px; height: 100px; background:#FFF;'Random Text that doesn't matter/div/td/ tr; $count++; } However, it still wasn't working, so I decided to mess around with it and just hard-code 1 in there. In my previous experience it will toggle the first occurrence of the div id, so I was just trying to avoid potential syntax errors until I figured it out...but I still have not --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---