[Proto-Scripty] Re: MySQL - order ID
But anyway, there is still something wrong with the self javascript, as the item created freezes (you can't drag it after the clone) I use the classname clone to hook the javascript to later, you can call these whatever you like, just be sure you tidy up and make everything match on the JS side, too. I put the remove first, because it's floated right in my layout, and you get more consistent results with right floats if you set them as the first thing inside the parent container. You can change these in the JavaScript at the bottom of index.php, that's where they're coming from. Walter On Jul 3, 2009, at 1:43 PM, WLQ wrote: Right, also line number 34. Now here is how its outputting in html: li class=clone id=item_92span class=remove(x)/spanclone3/ li When it should output it like: li id=item_92clone3span class=remove(x)/span Why does it give it a class of clone? And switching the places of remove class and the id (line:117+). --~--~-~--~~~---~--~~ 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] Simple effects queuing help!!
I have an Image with the id of 'img1'. When I click on it I want to fire a function called animate(). I'm trying to queue up some effects to get img1 to animate in the following manner: 1- Squish in to the top left-corner (http://wiki.github.com/madrobby/ scriptaculous/effect-squish) 2- while img1 is invisible I want to change the image source 3- Then Grow it back from the top-left corner down. The Squish Effect in reverse essentially. Here's what I was able to come up with so far: img id=img1 src=images/1 onclick=animate()/ script type=text/javascript language=javascript // ![CDATA[ function animate() { new Effect.Squish('img1'); new Effect.Grow('img1', {queue: 'end'}); } // ]] /script --~--~-~--~~~---~--~~ 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: Simple effects queuing help!!
Hi, I don't think effects queues will help you with this (unless someone's written a script.aculo.us effect that changes the src of an image -- which someone may very well have done). I see two choices: 1. Find or write a script.aculo.us effect that changes the src of an image. I'd recommend that you ensure that the effect doesn't finish until the image is loaded. Advantage here is that you can then reuse it, publish it so others can use it (give back), etc., etc. If you've ever written an effect for script.aculo.us before, my suspicion is that this would be easy to do. If not, there'd be a learning curve. 2. Just write it for this situation, which would look something like this: * Add an afterFinish callback to your Squish effect. * In the 'afterFinish' callback, hook the 'load' event of the img and then change its src. * In the 'load' callback, start the Grow effect. Advantage to #2 is that it should be really quick to write. HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jul 3, 7:27 pm, Kronprinz xrsfors...@hotmail.com wrote: I have an Image with the id of 'img1'. When I click on it I want to fire a function called animate(). I'm trying to queue up some effects to get img1 to animate in the following manner: 1- Squish in to the top left-corner (http://wiki.github.com/madrobby/ scriptaculous/effect-squish) 2- while img1 is invisible I want to change the image source 3- Then Grow it back from the top-left corner down. The Squish Effect in reverse essentially. Here's what I was able to come up with so far: img id=img1 src=images/1 onclick=animate()/ script type=text/javascript language=javascript // ![CDATA[ function animate() { new Effect.Squish('img1'); new Effect.Grow('img1', {queue: 'end'}); } // ]] /script --~--~-~--~~~---~--~~ 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: getWidth() on dynamic created element does not work
You were right. I was checking to early. Like in the W3C Recommendation mentioned, I added a DomNodeInserted EventListener to get the full width for the div container. Here's the result: // event listener for all inserted nodes var maxWidth = 0; $('imageContainer').observe('DOMNodeInserted', function(event) { maxWidth += Event.element(event).getWidth(); } for (var index = 0, len = image.length; index len; index++) { // create div element var itemDiv = new Element('div', { 'id' : 'item-' + index, 'class' : 'item' }); // create image element var itemImage = new Element('img'); itemImage.observe('load', function() { itemDiv.style.minWidth = this.getWidth() + 'px'; }); itemImage.src = itemPath + image[index]['src']; itemImage.alt = image[index]['caption']; itemDiv.appendChild(itemImage); $('imageContainer').appendChild(itemDiv); } Thanks for the fast and kind support! --~--~-~--~~~---~--~~ 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.Updater in Mozilla 1.6
Hi, I am using Ajax.Updater with : onFailure, onSuccess and onComplete callback methods. In onSuccess method, I am checking for transport.status value. That value is returned as 0 if connection with server is lost. So appropriately I am showing connection lost message. Now the problem I am facing is, In Mozilla 1.6, if connection with server is lost none of the callback methods are called. The Ajax call just gets struck. I am using Prototype JavaScript framework, version 1.6.0.2 Any help is appreciated. Thanks Siddhartha --~--~-~--~~~---~--~~ 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: Ajax.Updater in Mozilla 1.6
Hi, Now the problem I am facing is, In Mozilla 1.6... Mozilla 1.6? Apologies if I have the wrong end of the stick, but do you mean v1.6 of the Mozilla Suite? That was obsoleted (by v1.7) more than five years ago, and the project has been completely discontinued, with the last release being more than three years ago. Mozilla 1.7 has a total browser market share of about 0.07%[1]. [1] http://marketshare.hitslink.com/browser-market-share.aspx?qprid=2qpmr=40qpdt=1qpct=0qpcal=1qptimeframe=Mqpsp=124 I wouldn't count on Prototype 1.6 playing well with anything that outdated -- well, except IE6 that is (and not that much longer) ;-). FWIW, and again, apologies if I've just completely misunderstood. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jul 4, 11:27 am, Siddhartha Banik siddhartha.ba...@gmail.com wrote: Hi, I am using Ajax.Updater with : onFailure, onSuccess and onComplete callback methods. In onSuccess method, I am checking for transport.status value. That value is returned as 0 if connection with server is lost. So appropriately I am showing connection lost message. Now the problem I am facing is, In Mozilla 1.6, if connection with server is lost none of the callback methods are called. The Ajax call just gets struck. I am using Prototype JavaScript framework, version 1.6.0.2 Any help is appreciated. Thanks Siddhartha --~--~-~--~~~---~--~~ 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: Ajax.Updater in Mozilla 1.6
Yes, I am talking about Mozilla Suite v1.6 only. Agreed 1.6 is old enough, but the application we are building.. need to support our existing customers[Healthcare Domain].. many are using Mozilla 1.6. Considering complexities involved with upgrading all of them, we have preferred to make our application instead compatible with = Mozilla 1.6. The Ajax features we are using from Prototype.js is working well with Mozilla 1.6 also... except that connection lost one. Appreciate, if you can provide any direction to solve this problem. Thanks Siddhartha On Jul 4, 4:22 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Now the problem I am facing is, In Mozilla 1.6... Mozilla 1.6? Apologies if I have the wrong end of the stick, but do you mean v1.6 of the Mozilla Suite? That was obsoleted (by v1.7) more than five years ago, and the project has been completely discontinued, with the last release being more than three years ago. Mozilla 1.7 has a total browser market share of about 0.07%[1]. [1]http://marketshare.hitslink.com/browser-market-share.aspx?qprid=2qpm... I wouldn't count on Prototype 1.6 playing well with anything that outdated -- well, except IE6 that is (and not that much longer) ;-). FWIW, and again, apologies if I've just completely misunderstood. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jul 4, 11:27 am, Siddhartha Banik siddhartha.ba...@gmail.com wrote: Hi, I am using Ajax.Updater with : onFailure, onSuccess and onComplete callback methods. In onSuccess method, I am checking for transport.status value. That value is returned as 0 if connection with server is lost. So appropriately I am showing connection lost message. Now the problem I am facing is, In Mozilla 1.6, if connection with server is lost none of the callback methods are called. The Ajax call just gets struck. I am using Prototype JavaScript framework, version 1.6.0.2 Any help is appreciated. Thanks Siddhartha --~--~-~--~~~---~--~~ 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: Ajax.Updater in Mozilla 1.6
One more addition to above: Prototype.js is working well with Mozilla 1.7 --~--~-~--~~~---~--~~ 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: Inheritance issue.
HI, In the pattern you are using, `privateMember` is a static or class property. It is _shared_ between all instances of the same class, hence what you observed above. If you want true privacy, you'll need the following: var MySuperclass = Class.create({ initialize : function(value) { this.bar = function() { alert(value); } } }); Note that this is closure-based and comes at the expense of needing a `bar` function for each instance of MySuperclass (rather than using a single one one MySuperclass.prototype). Hope this helps. Best, Tobie On Jul 3, 10:13 pm, Matías M. matias.mirabe...@globant.com wrote: Hello guys. I guess to ask you something about the inheritance in Prototype. I'm implementing a private-member pattern in my classes, and it seems that's not working when using the inheritance in Prototype 1.6. Please, look at the example below: var MySuperclass = Class.create(function() { var privateMember = foo; var publicInterface = { initialize : function(theValue) { privateMember = theValue; }, bar : function() { alert(foo); } }; return publicInterface; }()); In this approach the privateMember attribute is trapped into the function scope and is not visible for the public object, but it's visible inside the object. When I try to extend this class from another one, the private attribute is replaced every time a new instance is created. For example: var MySubclass1 = Class.create(MySuperclass, function() { var publicInterface = { initialize : function($super, theValue) { $super(theValue); } }; return publicInterface; }()); var MySubclass2 = Class.create(MySuperclass, function() { var publicInterface = { initialize : function($super, theValue) { $super(theValue); } }; return publicInterface; }()); var obj1 = new MySubclass1(Hello); var obj2 = new MySubclass2(World); obj1.bar(); obj2.bar(); In any case, it'll display World instead Hello, and the right way should be to display Hello in the first case. I found a way to fix this behavior but it's not applied to Prototype 1.6. The fixing consists of giving an instance of the class instead the class reference to the Class.create method. See below: var MySubclass2 = Class.create(new MySuperclass(), function() { var publicInterface = { initialize : function($super, theValue) { $super(theValue); } }; return publicInterface; }()); Please, I need to know if there's any way in order to implement my approach, since I have a lot of work done in this way. Thank you beforehand, Matías M. --~--~-~--~~~---~--~~ 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: Form.request() file upload problem in ie6
2009/7/3 Alex McAuley webmas...@thecarmarketplace.com Ajax request will not send files :S Sorry! how make then gmail? When I add a attachment, after a seconds gmail show me what is uploaded --~--~-~--~~~---~--~~ 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: bug? or I made something wrong using fire
2009/6/27 T.J. Crowder t...@crowdersoftware.com I've written up a couple of things about closures that may be helpful, and specifically that walk you through this business of references vs. values: http://blog.niftysnippets.org/2008/02/closures-are-not-complicated.html http://blog.niftysnippets.org/2008/03/closures-by-example.html Hi T.J. Today at last I readed your blog. Based on your explanation I changed my function to this and work perfectly, many thanks. document.observe('dom:loaded', function(){ function observaEvento(evento){ elm = $(evento); if (elm) { elm.observe('change', function(evt) { console.log(call to: %s, 'sic:'+evento); document.fire('sic:'+evento); }); } } observaEvento('proyecto'); observaEvento('material'); }); --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---