[Proto-Scripty] drag and drop stop responding with having div - overflow:auto on the page.
Hi: I have a left menu div (position:fixed) which has a unordered list (ul). I have another content div which is scrollable (position: relative). I need to make the options in the ulli sortable using drag and drop feature.. I am using scriptaculous dragdrop.js and effects.js to have this sortable left menu. The issue is once the page is loaded and I DO NOT SCROLL the right content menu, I am able to drag and drop the individual elements of li correctly. As soon as I scroll the right content div, the drop feature stops working on the left menu div. I am still able to drag the left li items, but when I try to drop the item it does not let me drop at the position I want and instead go back to its original position. Any solution would be greatly appreciated. Thanks, Hitesh --~--~-~--~~~---~--~~ 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: image flickering with Effect.Morph
Yea.. had the same problem..did a video tutorial about that thing. i propose the effect.queue of the script.aculo.us core. annoyed me for a long time so just have a look at the tutorial http://muenchenwebdesign.com/devblog/2009/08/navigation-mit-effect-morph-script-aculo-us-munchen-webdesign/ this VIDEOTUTORIAL heldps this morph problem to run smooth. no lightnings or flickering anymore On Jul 15, 12:51 am, david david.brill...@gmail.com wrote: Hi Mario, I modify a little bit your js file, to add an internal variable that will save each morph effect one each element of the menu. if the element is in effect, just cancel it and continue. go to pastie to see my change:http://www.pastie.org/546167 -- david On 13 juil, 22:05, Mario Colombo mario.colo...@yetnet.ch wrote: Hi everybody, I am trying to code an OS X-style menu bar with prototype and scriptaculous 1.8.2. I have two problems which I hope to solve with your feedback. I myself am stuck after failing with all the ideas I had. Please find the example here:http://aldebaran.mine.nu/menu/menu.htmlhttp://aldebaran.mine.nu/menu/... 1st problem: image flickering: changing mouseover over the different divs produces a flash or flickering. Reading this group and other sources suggest that it is a problem with different Effects active at the same time. I tried to solve this over Effect.Queues and cancel the whole queue with my scope: 'menu' but unfortunately cancelling queues results in no effects at all: ---[code]-- // menuelement is the current menu div from $$('.level_one').each (function(menuelement) { elDimensions = menuelement.getDimensions(); // to set style manually to where the effect was cancelled var queue = Effect.Queues.get('menu'); // cancelling the whole scope: 'menu' queue queue.each(function(effect) { effect.cancel(); }); menuelement.setStyle('height:'+ elDimensions.height + 'px; ' + 'width:' + elDimensions.width + 'px;') // set dimensions to where effect stops var myEffect = new Effect.Morph(menuelement, {style: {width:'100px', height:'100px'}, queue: {position: 'end', scope: 'menu'}}); //new effect takes place ---[/code]-- I also tried to save all effects to the same variable myEffect, trying to have them overwrite themselves, which brought a partial improvement. 2nd problem: On 'mouseout' I would like the menu to return to its original state 'width:100px; height:100px;' I tried the following code: ---[code]-- Event.observe($('menu'), 'mouseout', function(event) { // 'menu' is the id of the containing div $$('.level_one').each(function(menuelement) { var myEffect = new Effect.Morph(menuelement, {style: {width:'100px', height:'100px'}}); });}); ---[/code]-- This resulted in erratic behaviour. Help would be greatly appreciated. Help for better OO programming is always welcome. Thank you in advance. Mario --~--~-~--~~~---~--~~ 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] Prototype: getStyle of document element throws exception
Hi, we are using Prototype 1.6.0.3 in combination with Gabriel Lanzani select.js. When loading the page in (any) IE browser, the first time the select box is clicked it will not open and a js error will occure. As fare as i understand at some point after the click the Prototype getOffsteParent is called with the actual Document element as argument. Wich later then will create an exception in element.getStyle because the document node dose not have a style property. Im not sure if it is Prototype's job to check whether the argument will create an exception. I patched the getOffsetParent checking whether the argument is not document (element !== document). I know that altering the library files is not Best Practice, maybe the problem could be fixed in future within Prototype, that if it is his responsibility. greetings FDA --~--~-~--~~~---~--~~ 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] Responders
Morning Guys / Gals... I am sure this has been covered before but i'll post it anyway as i cant find it in a search!... I am speeding up a website at the moment by using Ajax to do some dirty work in heavy loading pages (pagination and so on)... I need to put a loading spinner or text in place of an element while the ajax is doing its thing I could code each function to do this but i am sure there is an easier way. My first thought is to use Ajax.Responders to do something, but.. Is there a way i can get the Element that is going to be updated by the Ajax.Updater via Ajax.Responders - then i can just code something Generic into the JS and dont have to worry about updating stuff all the time... Thanks in advance 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: Casting a json object into an instance of a class
Hi, That should work. I notice that you have class.Create rather than Class.create; I assume that's just an error in the note and that the actual code uses Class.create? Because if not, that's your problem. if(myInstance.isB())... = isB is undefined That indicates there's a different problem. isB should be defined regardless, you defined it in your class definition. If the Object.extend thing weren't working, it should *return* undefined, but not *be* undefined. FWIW, this works: * * * * (also at http://pastie.org/581050) // Defining var Thing = Class.create({ initialize: function(src) { if (src) { Object.extend(this, src); } }, isB: function() { return this.b; } }); // Using: var t; t = new Thing({b: true}); alert(t.isB() ? + t.isB()); * * * * HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 11, 6:07 pm, Eric lefauv...@gmail.com wrote: Hi, I make some Ajax calls to fetch objects from my server, and I would like those object to be instance of some class. I just cannot find a way to achieve this... Here is what I've tried so far : var MyClass = class.Create({ initialize: function(src) { if(src) Object.extend(this,src); }, isB: function() { return this.b;} }); var myJsonObject = {a:0, b:true}; // xrh.responseJSON myInstance = new MyClass(myJsonObject); if(myInstance.isB())... = isB is undefined I also tried the opposite approach with: myInstance = Object.extend(myJsonObject,MyClass.prototype) if(myInstance.isB())... = isB is undefined What is the correct way of achieving this ? Eric --~--~-~--~~~---~--~~ 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: Responders
Hi Alex, I don't think there's any official way. A quick look at the 1.6.0.3 release (line #1439) suggests that your responder can access the target container via the request parameter passed to your responder, specifically request.container.success (the container that will be updated on success) and request.container.failure (the one that will be updated on failure). As this is undocumented (AFAIK), it may change from release to release... HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 12, 9:37 am, Jeztah webmas...@thecarmarketplace.com wrote: Morning Guys / Gals... I am sure this has been covered before but i'll post it anyway as i cant find it in a search!... I am speeding up a website at the moment by using Ajax to do some dirty work in heavy loading pages (pagination and so on)... I need to put a loading spinner or text in place of an element while the ajax is doing its thing I could code each function to do this but i am sure there is an easier way. My first thought is to use Ajax.Responders to do something, but.. Is there a way i can get the Element that is going to be updated by the Ajax.Updater via Ajax.Responders - then i can just code something Generic into the JS and dont have to worry about updating stuff all the time... Thanks in advance 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: Prototype: getStyle of document element throws exception
Hi, Can you post a minimalist, complete failing test case? I'm not immediately seeing how it would ascend all the way to document unless the element you're using isn't in the body, which would be curious. getOffsetParent stops as of document.body and doesn't try to go further up than that. Thanks, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 11, 4:29 pm, fda dar...@gmx.it wrote: Hi, we are using Prototype 1.6.0.3 in combination with Gabriel Lanzani select.js. When loading the page in (any) IE browser, the first time the select box is clicked it will not open and a js error will occure. As fare as i understand at some point after the click the Prototype getOffsteParent is called with the actual Document element as argument. Wich later then will create an exception in element.getStyle because the document node dose not have a style property. Im not sure if it is Prototype's job to check whether the argument will create an exception. I patched the getOffsetParent checking whether the argument is not document (element !== document). I know that altering the library files is not Best Practice, maybe the problem could be fixed in future within Prototype, that if it is his responsibility. greetings FDA --~--~-~--~~~---~--~~ 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: Responders
Thanks TJ, I'll look into it and see if i can hack something together Alex Mcauley http://www.thevacancymarket.com - Original Message - From: T.J. Crowder t...@crowdersoftware.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, August 12, 2009 9:54 AM Subject: [Proto-Scripty] Re: Responders Hi Alex, I don't think there's any official way. A quick look at the 1.6.0.3 release (line #1439) suggests that your responder can access the target container via the request parameter passed to your responder, specifically request.container.success (the container that will be updated on success) and request.container.failure (the one that will be updated on failure). As this is undocumented (AFAIK), it may change from release to release... HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 12, 9:37 am, Jeztah webmas...@thecarmarketplace.com wrote: Morning Guys / Gals... I am sure this has been covered before but i'll post it anyway as i cant find it in a search!... I am speeding up a website at the moment by using Ajax to do some dirty work in heavy loading pages (pagination and so on)... I need to put a loading spinner or text in place of an element while the ajax is doing its thing I could code each function to do this but i am sure there is an easier way. My first thought is to use Ajax.Responders to do something, but.. Is there a way i can get the Element that is going to be updated by the Ajax.Updater via Ajax.Responders - then i can just code something Generic into the JS and dont have to worry about updating stuff all the time... Thanks in advance 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: Casting a json object into an instance of a class
Thanks for your reply T.J.! I did used Class instead of class. This was a typo when I posted :o) You're right, it should have work the way I did it... and it actually did work this way... ...except that due to a mistake in my events handling, my new thing value was overridden by some obsolete part of code just after being converted into a class instance :o( And since it was overridden by the raw JSON object value, I stupidly assumed that the casting didn't work. At least, I now know what is the state of the art way of getting a class instance through Ajax ;o) Thanks again! Eric On Aug 12, 10:49 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, That should work. I notice that you have class.Create rather than Class.create; I assume that's just an error in the note and that the actual code uses Class.create? Because if not, that's your problem. if(myInstance.isB())... = isB is undefined That indicates there's a different problem. isB should be defined regardless, you defined it in your class definition. If the Object.extend thing weren't working, it should *return* undefined, but not *be* undefined. FWIW, this works: * * * * (also athttp://pastie.org/581050) // Defining var Thing = Class.create({ initialize: function(src) { if (src) { Object.extend(this, src); } }, isB: function() { return this.b; } }); // Using: var t; t = new Thing({b: true}); alert(t.isB() ? + t.isB()); * * * * HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available --~--~-~--~~~---~--~~ 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 compatibility issue with prototype 1.6 version
i have same problem here but i am using IE7. The error message is same as karamjit. On Tue, Aug 11, 2009 at 9:23 AM, John Harris GM jkharr...@gmail.com wrote: On 8/10/2009 4:02 PM, karamjit wrote: Hi All, I am using the prototype version 1.6 framework with lightview api. I having issue with IE 8, but the same code is working fine in FireFox. Error : Line 1928, Invalid argument. Can someone please help me to solve this issue? Thanks in Advance Regards Karamjit I am new to serious Prototype/Scriptaculous programming, but I had a problem with IE8. My code worked on FF, Safari, Chrome but not IE8 or IE7. I was using the InPlace Editor. True not the same as lightview, but when I loaded Prototype 1.6.1_RC3, it worked. I understand RC2 and RC3 are interim releases that have IE8 issues resolved. See the website. Good luck. I hope this is some help. John --~--~-~--~~~---~--~~ 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] loading problem with IE and prototype (Fr, En)
Hellow and sorry for my english... I'm french I have a problem with prototype. On IE I must reload my page because in the first load prototype doesn't work. for example if you go on my website with IE http://www.sitedechat.eu/?page=chat the page doesn't work at first. You reload one times (F5)...and it works ... I don't understand ... with Firefox and other borwsers it's ok... Thanks ! J'ai un problème avec prototype et IE. Je suis obligé de recharger la page pour que IE prenne en compte le framework... par exemple sur mon site http://www.sitedechat.eu/?page=chat vous affiche la page avec IE uen fois et rien ne se passe ... actualisez (F5) et le chat devient fonctionnel ... Franchement je ne comprends rien avez vous une piste ? les autres borwsers fonctionnent ... merci d'avance ! @+ --~--~-~--~~~---~--~~ 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: Casting a json object into an instance of a class
At least, I now know what is the state of the art way of getting a class instance through Ajax ;o) Well, I don't know if it's state of the art, but provided you're in control of both ends (so, for instance, the raw data object doesn't get fields that end up overwriting your methods), it seems fine. Thanks again! Happy to help, -- T.J. On Aug 12, 12:06 pm, Eric lefauv...@gmail.com wrote: Thanks for your reply T.J.! I did used Class instead of class. This was a typo when I posted :o) You're right, it should have work the way I did it... and it actually did work this way... ...except that due to a mistake in my events handling, my new thing value was overridden by some obsolete part of code just after being converted into a class instance :o( And since it was overridden by the raw JSON object value, I stupidly assumed that the casting didn't work. At least, I now know what is the state of the art way of getting a class instance through Ajax ;o) Thanks again! Eric On Aug 12, 10:49 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, That should work. I notice that you have class.Create rather than Class.create; I assume that's just an error in the note and that the actual code uses Class.create? Because if not, that's your problem. if(myInstance.isB())... = isB is undefined That indicates there's a different problem. isB should be defined regardless, you defined it in your class definition. If the Object.extend thing weren't working, it should *return* undefined, but not *be* undefined. FWIW, this works: * * * * (also athttp://pastie.org/581050) // Defining var Thing = Class.create({ initialize: function(src) { if (src) { Object.extend(this, src); } }, isB: function() { return this.b; } }); // Using: var t; t = new Thing({b: true}); alert(t.isB() ? + t.isB()); * * * * HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available --~--~-~--~~~---~--~~ 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: loading problem with IE and prototype (Fr, En)
Wrap the function in Event.observe(window,'load' The DOM is not loaded and cannot fire the bits to the relavtive element Somehing like Event.observe(window,'load',function() { var periode = new PeriodicalExecuter(f1,2); }); should do the trick HTH Alex Mcauley http://www.thevacancymarket.com - Original Message - From: nansouille nansouill...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, August 12, 2009 11:09 AM Subject: [Proto-Scripty] loading problem with IE and prototype (Fr, En) Hellow and sorry for my english... I'm french I have a problem with prototype. On IE I must reload my page because in the first load prototype doesn't work. for example if you go on my website with IE http://www.sitedechat.eu/?page=chat the page doesn't work at first. You reload one times (F5)...and it works ... I don't understand ... with Firefox and other borwsers it's ok... Thanks ! J'ai un problème avec prototype et IE. Je suis obligé de recharger la page pour que IE prenne en compte le framework... par exemple sur mon site http://www.sitedechat.eu/?page=chat vous affiche la page avec IE uen fois et rien ne se passe ... actualisez (F5) et le chat devient fonctionnel ... Franchement je ne comprends rien avez vous une piste ? les autres borwsers fonctionnent ... merci d'avance ! @+ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---