[Proto-Scripty] Re: When using sortable how do you get the id of the dragged item
It seems like this doesn't work with a droppable. Anyone else done something like this? On Feb 1, 5:31 pm, Matthew Tullett ouratel...@googlemail.com wrote: It's the id of the list container. I'm just wondering if you could use the droppable function as well on the same list. Sent from my iPhone On 1 Feb 2009, at 17:24, Walter Lee Davis wa...@wdstudio.com wrote: Sortable.create has a similar callback called onChange. It gets called whenever the sort order changes while dragging. According to the docs, it gets the affected element as its parameter, but I'm not sure if that's the list or the item you dragged into it. You'll have to test. Walter On Feb 1, 2009, at 12:12 PM, Matthew Tullett wrote: Can this be done with the sortable.create? Or combinded with. --~--~-~--~~~---~--~~ 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] using Ajax.Responders with multiple ajax requests
Hi everyone, hoping for a gentle ride: I mostly program actionscript rather than javascript, so although the syntax is similar i get a little stuck now and then. I'm using the global ajax.responders method to start an animation whenever an ajax request is made, and stop the animation upon completion of the request. however it does not work with synchronous requests. The onSuccess method of my ajax requests work as they should, however the timer continues to animate. It's as if the ajax.responders onComplete method isn't called. any idea what i'm doing wrong? thx kenneth Ajax.Responders.register({ onCreate: function(){ ajaxPageTimer = new __ajaxTimer('ajaxPageTimerBox',100); ajaxPageTimer.startAnimation(); }, onComplete: function(){ ajaxPageTimer.stopAnimation(); } }); var mainPages = Array(); var myRequests = new Object; function loadPages(pageSource, page){ var url; var i = 1; //loadPage(); function loadPage() { url = incfiles/main + i + .php; myRequests[i] = new Ajax.Request(url, { onSuccess: function(transport){ mainPages[i] = url; pasteMainContent.defer(transport.responseText, i); i++; if (imenu.num+1) loadPage(); //so this is faux asyncronous } }); } } --~--~-~--~~~---~--~~ 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: what happened to protosafe
I am also curious what has happen to protosafe? Anyone? On Jan 20, 4:27 pm, river weiguowa...@gmail.com wrote: These 2 links don't work, http://www.protolific.net/http://code.google.com/p/protosafe/ Desperately need it. Any information is greatly appreciated. --~--~-~--~~~---~--~~ 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: what happened to protosafe
Hi, Weird, I could have sworn I responded to this one. JDD, the person maintaining ProtoSafe, decided to stop maintaining it and took down the files. You could probably find a copy in a cache somewhere, but again, it's no longer being maintained. There are various suggestions and links for minifying Prototype here: http://proto-scripty.wikidot.com/prototype:tip-minimizing-download-times HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 6:42 am, magi...@gmail.com bax...@gmail.com wrote: I am also curious what has happen to protosafe? Anyone? On Jan 20, 4:27 pm, river weiguowa...@gmail.com wrote: These 2 links don't work, http://www.protolific.net/http://code.google.com/p/protosafe/ Desperately need it. Any information is greatly appreciated. --~--~-~--~~~---~--~~ 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: using Ajax.Responders with multiple ajax requests
Hi, It's as if the ajax.responders onComplete method isn't called. Sorry, this is one of my pet peeves: Surely it would take seconds to modify your code to find out for sure whether it is, rather than speculating? ;-) however it does not work with synchronous requests. I don't see any synchronous requests in the code you quoted. Ajax.Request defaults to asynchronous unless you specify asynchronous: false in the options. Synchronous requests are a very bad idea; they completely freeze the UI of most browsers, so you're best off continuing to leave the option out. any idea what i'm doing wrong? Looking at that code, what if you have more than one request running at a time? (And you do, in the code you posted, assuming menu.num is at least 2.) Since you're using a global for the timer, Request A can create a timer that gets started, then Request B starts a second timer (overwriting the reference to the one created by Request A), then Request A completes and clears Request B's timer -- Request A's timer is left in limbo. You might want to only create the timer if it hasn't already been created, and in the complete callback, use the counter maintained by Prototype (discussed on the responders page[1]) to decide whether to stop it. Or use your own counter within the timer, whatever route you want to go. I think if you look into those issues a bit, the answer's probably somewhere in that area. [1] http://prototypejs.org/api/ajax/responders HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 2, 3:41 pm, gilpster kennethgil...@hotmail.com wrote: Hi everyone, hoping for a gentle ride: I mostly program actionscript rather than javascript, so although the syntax is similar i get a little stuck now and then. I'm using the global ajax.responders method to start an animation whenever an ajax request is made, and stop the animation upon completion of the request. however it does not work with synchronous requests. The onSuccess method of my ajax requests work as they should, however the timer continues to animate. It's as if the ajax.responders onComplete method isn't called. any idea what i'm doing wrong? thx kenneth Ajax.Responders.register({ onCreate: function(){ ajaxPageTimer = new __ajaxTimer('ajaxPageTimerBox',100); ajaxPageTimer.startAnimation(); }, onComplete: function(){ ajaxPageTimer.stopAnimation(); } }); var mainPages = Array(); var myRequests = new Object; function loadPages(pageSource, page) { var url; var i = 1; //loadPage(); function loadPage() { url = incfiles/main + i + .php; myRequests[i] = new Ajax.Request(url, { onSuccess: function(transport){ mainPages[i] = url; pasteMainContent.defer(transport.responseText, i); i++; if (imenu.num+1) loadPage(); //so this is faux asyncronous } }); } } --~--~-~--~~~---~--~~ 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] Using setStyle to change background-image
Hi, I have a div and I'd like to set its background image style using the object format. I tried without success the following things: $('mydiv').setStyle({'backgroundImage':'wait.gif'}); $('mydiv').setStyle({'backgroundImage':'url(wait.gif)'}); $('mydiv').setStyle({'background-image':'wait.gif'}); $('mydiv').setStyle({'background-image':'url(wait.gif)'}); It doesn't rise any error but doesn't set the background either. The only working way I found until now is using the string format parameter. This one works: $('mydiv').setStyle('background-image:url(wait.gif);'}); I really would like to use the object form, which is working for other style properties on the very same object. (ex: $('mydiv').setStyle({'left':xpos+'px','top':ypos+'px'}); ) Am I missing something here? Thanks for any hint. 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: Hash#filter returns an Array?
Maybe filter should be an alias of findall for arrays, but shouldn't it really return a hash for hashes? Especially if thats its behavior in ruby, which Prototype is supposed to be modeled after. On Feb 3, 4:59 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi Brad, Sorry, I missed that Hash inherits from Enumerable (and I've filed a doc bug on it[1] and will fix it -- the doc page for Hash doesn't mention Enumerable). So I think that's your answer: Hash#filter is an alias for Enumerable#findAll[2], which is documented as returning an array, not a Hash, and so having it return a Hash would be breaking the contract. [1]http://prototype.lighthouseapp.com/projects/8886-prototype/tickets/535 [2]http://prototypejs.org/api/enumerable/findall Sorry again to have missed the Enumerable thing in the first place. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 12:25 am, Brad bradavo...@gmail.com wrote: It does. Hash still inherits from Enumerable, hence the usage of Hash#findAll(). - Brad On Feb 2, 1:34 am, ColinFine colin.f...@pace.com wrote: On Jan 31, 11:11 pm, Brad bradavo...@gmail.com wrote: Yup, found it -http://dev.rubyonrails.org/ticket/3592 It is indeed a bug in Prototype that hasn't been addressed. - Brad But it seems to me that it's gone away, because Hash no longer mixes in Enumerable, does it? Colin --~--~-~--~~~---~--~~ 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 to stop MS Internet Explorer from rendering hidden divs when page loads
Hi, Use a class name to hide them, then remove the class name to show them. E.g., in the html: div class='blarg'.../div In the CSS: .blarg { display: none; } When you want to hide one, use addClassName to add the class; when you want to show it, remove the classname. HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 2:42 pm, shetc sh...@bellsouth.net wrote: Hi All, I'm using Prototype for a small wizard-like display within a web page. The wizard is really a checklist for the user -- as the user checks off that he has completed a required task then the next required task is revealed. This all works great in FireFox -- when the page is first displayed then only the first task to be complete is revealed. However, in IE, the entire set of hidden tasks is briefly displayed then hidden when the page loads. The resultant pages looks correct but it would be nice to get rid of the quick flash of the hidden tasks when the page loads. I do something like the following: Event.observe(window, 'load', function() { // hide uncompleted tasks $('div0', 'div1', 'div2', 'div3'').invoke('hide'); } Does anyone have any ideas on how to stop the 'IE Flash'? Thanks in advance, Steve --~--~-~--~~~---~--~~ 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: Hash#filter returns an Array?
2009/2/3 T.J. Crowder t...@crowdersoftware.com: Hi, Maybe filter should be an alias of findall for arrays, but shouldn't it really return a hash for hashes? FWIW (and it ain't much, I'm not a decision maker on Prototype stuff), in my opinion it would be an _extremely_ bad idea for Hash to break the contract documented for Enumerable. ...in ruby, which Prototype is supposed to be modeled after. Prototype has been split off from Ruby for a long time now. I'd venture to say that most people using Prototype do not use and may well never have even seen Ruby. PHP seems to be the server-side language I see most in code snippets from people asking questions. Hey, he's talking about me! The only reason I have Ruby installed is so that I can get the fixes to main git source into my test bed. rake dist... etc. Never written a single line of Ruby code. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 2:04 pm, disccomp discc...@gmail.com wrote: Maybe filter should be an alias of findall for arrays, but shouldn't it really return a hash for hashes? Especially if thats its behavior in ruby, which Prototype is supposed to be modeled after. On Feb 3, 4:59 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi Brad, Sorry, I missed that Hash inherits from Enumerable (and I've filed a doc bug on it[1] and will fix it -- the doc page for Hash doesn't mention Enumerable). So I think that's your answer: Hash#filter is an alias for Enumerable#findAll[2], which is documented as returning an array, not a Hash, and so having it return a Hash would be breaking the contract. [1]http://prototype.lighthouseapp.com/projects/8886-prototype/tickets/535 [2]http://prototypejs.org/api/enumerable/findall Sorry again to have missed the Enumerable thing in the first place. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 12:25 am, Brad bradavo...@gmail.com wrote: It does. Hash still inherits from Enumerable, hence the usage of Hash#findAll(). - Brad On Feb 2, 1:34 am, ColinFine colin.f...@pace.com wrote: On Jan 31, 11:11 pm, Brad bradavo...@gmail.com wrote: Yup, found it -http://dev.rubyonrails.org/ticket/3592 It is indeed a bug in Prototype that hasn't been addressed. - Brad But it seems to me that it's gone away, because Hash no longer mixes in Enumerable, does it? Colin -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 Standing on the shoulders of some very clever giants! --~--~-~--~~~---~--~~ 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: Using setStyle to change background-image
2009/2/3 Eric lefauv...@gmail.com: Hi, I have a div and I'd like to set its background image style using the object format. I tried without success the following things: $('mydiv').setStyle({'backgroundImage':'wait.gif'}); $('mydiv').setStyle({'backgroundImage':'url(wait.gif)'}); $('mydiv').setStyle({'background-image':'wait.gif'}); $('mydiv').setStyle({'background-image':'url(wait.gif)'}); It doesn't rise any error but doesn't set the background either. The only working way I found until now is using the string format parameter. This one works: $('mydiv').setStyle('background-image:url(wait.gif);'}); I really would like to use the object form, which is working for other style properties on the very same object. (ex: $('mydiv').setStyle({'left':xpos+'px','top':ypos+'px'}); ) Am I missing something here? Thanks for any hint. Eric The attribute name should not be in quotes ... $(element).setStyle({ backgroundColor: '#900', fontSize: '12px' }); so ... $('mydiv').setStyle({backgroundImage:url(waitgif)}); -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 Standing on the shoulders of some very clever giants! --~--~-~--~~~---~--~~ 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: Using setStyle to change background-image
2009/2/3 Richard Quadling rquadl...@googlemail.com: 2009/2/3 Eric lefauv...@gmail.com: Hi, I have a div and I'd like to set its background image style using the object format. I tried without success the following things: $('mydiv').setStyle({'backgroundImage':'wait.gif'}); $('mydiv').setStyle({'backgroundImage':'url(wait.gif)'}); $('mydiv').setStyle({'background-image':'wait.gif'}); $('mydiv').setStyle({'background-image':'url(wait.gif)'}); It doesn't rise any error but doesn't set the background either. The only working way I found until now is using the string format parameter. This one works: $('mydiv').setStyle('background-image:url(wait.gif);'}); I really would like to use the object form, which is working for other style properties on the very same object. (ex: $('mydiv').setStyle({'left':xpos+'px','top':ypos+'px'}); ) Am I missing something here? Thanks for any hint. Eric The attribute name should not be in quotes ... $(element).setStyle({ backgroundColor: '#900', fontSize: '12px' }); so ... $('mydiv').setStyle({backgroundImage:url(waitgif)}); -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 Standing on the shoulders of some very clever giants! Sorry for the typo ... wait.gif not waitgif -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 Standing on the shoulders of some very clever giants! --~--~-~--~~~---~--~~ 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 to stop MS Internet Explorer from rendering hidden divs when page loads
Richard, it worked! Thanks very much (and I hope you are not snowed in either :-)) --~--~-~--~~~---~--~~ 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: Hash#filter returns an Array?
Hi, Maybe filter should be an alias of findall for arrays, but shouldn't it really return a hash for hashes? FWIW (and it ain't much, I'm not a decision maker on Prototype stuff), in my opinion it would be an _extremely_ bad idea for Hash to break the contract documented for Enumerable. ...in ruby, which Prototype is supposed to be modeled after. Prototype has been split off from Ruby for a long time now. I'd venture to say that most people using Prototype do not use and may well never have even seen Ruby. PHP seems to be the server-side language I see most in code snippets from people asking questions. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 2:04 pm, disccomp discc...@gmail.com wrote: Maybe filter should be an alias of findall for arrays, but shouldn't it really return a hash for hashes? Especially if thats its behavior in ruby, which Prototype is supposed to be modeled after. On Feb 3, 4:59 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi Brad, Sorry, I missed that Hash inherits from Enumerable (and I've filed a doc bug on it[1] and will fix it -- the doc page for Hash doesn't mention Enumerable). So I think that's your answer: Hash#filter is an alias for Enumerable#findAll[2], which is documented as returning an array, not a Hash, and so having it return a Hash would be breaking the contract. [1]http://prototype.lighthouseapp.com/projects/8886-prototype/tickets/535 [2]http://prototypejs.org/api/enumerable/findall Sorry again to have missed the Enumerable thing in the first place. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 12:25 am, Brad bradavo...@gmail.com wrote: It does. Hash still inherits from Enumerable, hence the usage of Hash#findAll(). - Brad On Feb 2, 1:34 am, ColinFine colin.f...@pace.com wrote: On Jan 31, 11:11 pm, Brad bradavo...@gmail.com wrote: Yup, found it -http://dev.rubyonrails.org/ticket/3592 It is indeed a bug in Prototype that hasn't been addressed. - Brad But it seems to me that it's gone away, because Hash no longer mixes in Enumerable, does it? Colin --~--~-~--~~~---~--~~ 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 to stop MS Internet Explorer from rendering hidden divs when page loads
Hi, If you apply the class names correctly, it won't flash on load. Obviously, you can do it with inline style as Richard suggested. I tend to avoid inline style, instead prefering to mark content with classes relevant to its structural purpose and then apply styling to that structure. FWIW, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 4:35 pm, shetc sh...@bellsouth.net wrote: Hi T.J., Thanks for replying! I tried your suggestion but I'm still seeing the flash at page load time. Hope you are not snowed in :-) Steve --~--~-~--~~~---~--~~ 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] IE 7 Enhanced Security
When loading a page that includes the prototype.js library (I've tried both 1.6.0.2 and 1.6.0.3), IE 7 pops up a dialog box that says Content from the Web site below is being blocked by Internet Explorer Enhanced Security Configuration and lists the URL http://;. That's right - no IP Name, 'localhost' or anything. Any attempt to add this to IE's allowed URLs fails since it's not a valid URL. A web page as simple as the one below exhibits this sympton. If I remove the link to prototype.js, the behavior goes away. html head titletesting/title script language=javascript type=text/javascript src=/javascript/ prototype.js/script /head body ptesting/p /body/html --~--~-~--~~~---~--~~ 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: what happened to protosafe
LOL Right, I forgot he double-posted. -- T.J. :-) On Feb 3, 4:22 pm, Richard Quadling rquadl...@googlemail.com wrote: 2009/2/3 T.J. Crowder t...@crowdersoftware.com: Hi, Weird, I could have sworn I responded to this one. Don't worry. You did. http://groups.google.com/group/prototype-scriptaculous/browse_thread/... JDD, the person maintaining ProtoSafe, decided to stop maintaining it and took down the files. You could probably find a copy in a cache somewhere, but again, it's no longer being maintained. There are various suggestions and links for minifying Prototype here: http://proto-scripty.wikidot.com/prototype:tip-minimizing-download-times HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 6:42 am, magi...@gmail.com bax...@gmail.com wrote: I am also curious what has happen to protosafe? Anyone? On Jan 20, 4:27 pm, river weiguowa...@gmail.com wrote: These 2 links don't work, http://www.protolific.net/http://code.google.com/p/protosafe/ Desperately need it. Any information is greatly appreciated. -- - Richard Quadling Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498r=213474731 Standing on the shoulders of some very clever giants! --~--~-~--~~~---~--~~ 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: div is blinking after Effect.Opacity
Hi v1ru8, Sorry, I miss the problem ! there is in the function two Effect.Opacity for the same HTML element, that are not linked, so what's happend: - first Effect.Opacity launch (duration of 1s on the main element ) - Next some AJAX, and other effects on differents elements, - To finish, another effect on the main element, but previous Effect.Opacity has normaly not already finished. == to resolve this problem, just try to chain all effects, try something like that to wait launching the second effect AFTER first one is finish.: function moveMenuItem(item,ymove,appname){ if(item != elementDown){ new Effect.Move(item,{x:0, y: ymove, mode : 'relative'}); new Effect.Opacity('main', { from: 1, to: 0 ,afterFinish:{ new Effect.Opacity('main', { from: 0, to: 1 }); }}); new Ajax.Updater('main_menu','include/'+appname+'/ menu.html'); new Ajax.Updater('main_content','include/'+appname+'/ features.html'); if(elementDown){ new Effect.Move(elementDown,{x:0, y: 0, mode : 'absolute'}); } elementDown = item; } } I also change the first Effect.Move and modify the option relative to absolute (I'm not sure that it's a very good solution but ??). because as I say, I thought it was a positionning problem. -- david On 3 fév, 13:09, david david.brill...@gmail.com wrote: Hi V1ru8, I now see the problem. I did really know what the problem is at first glance. I think the problem could be around the position value of differents elements, but I could find exactly it. I have grab the code, and see if I can see something. -- david. On 31 jan, 00:13, V1ru8 post.tho...@gmail.com wrote: Hi Sorry but I had to disable the effect. Now I've re enabled it. Can you take a look now? Would be very nice. Thx On Jan 30, 12:36 pm, david david.brill...@gmail.com wrote: Hiv1ru8, I did not see anything, I'm using FF3. Is the problem still there ?? -- david On 27 jan, 16:45,V1ru8post.tho...@gmail.com wrote: I use to following js function: function moveMenuItem(item,ymove,appname){ if(item != elementDown){ new Effect.Opacity('main', { from: 1, to: 0 }); new Effect.Move(item,{x:0, y: ymove, mode : 'relative'}); new Ajax.Updater('main_menu','include/'+appname+'/menu.html'); new Ajax.Updater('main_content','include/'+appname+'/ features.html'); if(elementDown){ new Effect.Move(elementDown,{x:0, y: 0, mode : 'absolute'}); } elementDown = item; new Effect.Opacity('main', { from: 0, to: 1 }); } } to see it in action:http://apps.v1ru8.net now after the Opacity has changed back to 1 the div 'main' blinks once. What can I do to remove that? There is an other problem with the effect. When the moved items are moved over the currently changing 'main' div. The moving div is behind the flushing div. After the above described blink the moved div is on top again. But I want it always on top. how can i change that order? I tried to set z-index on the main div to -1 but that didn't helped. thanks the help Thomas --~--~-~--~~~---~--~~ 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 7 Enhanced Security
Hi john, If I understand the problem (if there is a problem), IE security model is applied to each window, so if a window should go to internet (defined for exemple in the start page), you haver this message if you try to load a loacl page WITH javascript. And I think the oppposite is still true. IE has a strong security behaviour :)) -- david On 3 fév, 17:43, john.deig...@gmail.com john.deig...@gmail.com wrote: When loading a page that includes the prototype.js library (I've tried both 1.6.0.2 and 1.6.0.3), IE 7 pops up a dialog box that says Content from the Web site below is being blocked by Internet Explorer Enhanced Security Configuration and lists the URL http://;. That's right - no IP Name, 'localhost' or anything. Any attempt to add this to IE's allowed URLs fails since it's not a valid URL. A web page as simple as the one below exhibits this sympton. If I remove the link to prototype.js, the behavior goes away. html head titletesting/title script language=javascript type=text/javascript src=/javascript/ prototype.js/script /head body ptesting/p /body/html --~--~-~--~~~---~--~~ 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: Using setStyle to change background-image
2009/2/3 Richard Quadling rquadl...@googlemail.com: The attribute name should not be in quotes ... Thanks for the reply Richard, But I also tried without the quotes, which are optional (except for 'background-image' since in contains a dash). Documentation says Element.setStyle should accept both casing (dom- like (with-dashes) and javascript like (withCamelCase) but it looks like none of them work for this property... I would really like to use object format in order to set many parameters in one call without doing heavy string processing (I may have to do it on up to 2000+ DOM objects when page is loaded...). Any idea about what I am missing? --~--~-~--~~~---~--~~ 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: Hash#filter returns an Array?
TJ, thanks for correcting the docs. I hadn't noticed that error either. Are you suggesting that there no intersection of Prototype and Ruby communities? I only know of Prototype because of Ruby on Rails. Let's take Hash#reject() as an example. Let's say I'm moving server- side Ruby code to my Prototype-enhanced client-side. Ruby code: { a = 100, b = 200, c = 300 }.reject {|key, value| key == b } = {a=100, c=300} Translated to Javascript: $H({ a: 100, b: 200, c: 300 }).reject(function(i) { return i.key == b }) = [[a, 100], [c, 300]] Prototype returns an array? What good is an array if I started with a hash? It is intuitive that a reject() method returns a subset of the original data structure and not convert it to an entirely different one. Perhaps this is a plea better left for the Prototype-core list. On Feb 3, 6:18 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Maybe filter should be an alias of findall for arrays, but shouldn't it really return a hash for hashes? FWIW (and it ain't much, I'm not a decision maker on Prototype stuff), in my opinion it would be an _extremely_ bad idea for Hash to break the contract documented for Enumerable. ...in ruby, which Prototype is supposed to be modeled after. Prototype has been split off from Ruby for a long time now. I'd venture to say that most people using Prototype do not use and may well never have even seen Ruby. PHP seems to be the server-side language I see most in code snippets from people asking questions. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 2:04 pm, disccomp discc...@gmail.com wrote: Maybe filter should be an alias of findall for arrays, but shouldn't it really return a hash for hashes? Especially if thats its behavior in ruby, which Prototype is supposed to be modeled after. On Feb 3, 4:59 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi Brad, Sorry, I missed that Hash inherits from Enumerable (and I've filed a doc bug on it[1] and will fix it -- the doc page for Hash doesn't mention Enumerable). So I think that's your answer: Hash#filter is an alias for Enumerable#findAll[2], which is documented as returning an array, not a Hash, and so having it return a Hash would be breaking the contract. [1]http://prototype.lighthouseapp.com/projects/8886-prototype/tickets/535 [2]http://prototypejs.org/api/enumerable/findall Sorry again to have missed the Enumerable thing in the first place. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 12:25 am, Brad bradavo...@gmail.com wrote: It does. Hash still inherits from Enumerable, hence the usage of Hash#findAll(). - Brad On Feb 2, 1:34 am, ColinFine colin.f...@pace.com wrote: On Jan 31, 11:11 pm, Brad bradavo...@gmail.com wrote: Yup, found it -http://dev.rubyonrails.org/ticket/3592 It is indeed a bug in Prototype that hasn't been addressed. - Brad But it seems to me that it's gone away, because Hash no longer mixes in Enumerable, does it? Colin --~--~-~--~~~---~--~~ 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] delayedobserver doesn't work with single character id
I am setting up a form to query our Google Mini. Google's default parameter for the search term is 'q'. So you give your text input a name/id of 'q' I did this and setup a delayedobserver to trigger my request. However, it is never triggered. If I change the name/id to anything longer than one character it works. But if I change it back to 'q', a single character, it does not work. Is there some sort of requirement that needs names/ids to be more than one character? --~--~-~--~~~---~--~~ 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: Hash#filter returns an Array?
Perhaps this is a plea better left for the Prototype-core list. Like I said, I'm not a decision maker here. But breaking contracts is pretty well established as a Bad Idea. -- T.J. ;-) On Feb 3, 6:54 pm, Brad bradavo...@gmail.com wrote: TJ, thanks for correcting the docs. I hadn't noticed that error either. Are you suggesting that there no intersection of Prototype and Ruby communities? I only know of Prototype because of Ruby on Rails. Let's take Hash#reject() as an example. Let's say I'm moving server- side Ruby code to my Prototype-enhanced client-side. Ruby code: { a = 100, b = 200, c = 300 }.reject {|key, value| key == b } = {a=100, c=300} Translated to Javascript: $H({ a: 100, b: 200, c: 300 }).reject(function(i) { return i.key == b }) = [[a, 100], [c, 300]] Prototype returns an array? What good is an array if I started with a hash? It is intuitive that a reject() method returns a subset of the original data structure and not convert it to an entirely different one. Perhaps this is a plea better left for the Prototype-core list. On Feb 3, 6:18 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Maybe filter should be an alias of findall for arrays, but shouldn't it really return a hash for hashes? FWIW (and it ain't much, I'm not a decision maker on Prototype stuff), in my opinion it would be an _extremely_ bad idea for Hash to break the contract documented for Enumerable. ...in ruby, which Prototype is supposed to be modeled after. Prototype has been split off from Ruby for a long time now. I'd venture to say that most people using Prototype do not use and may well never have even seen Ruby. PHP seems to be the server-side language I see most in code snippets from people asking questions. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 2:04 pm, disccomp discc...@gmail.com wrote: Maybe filter should be an alias of findall for arrays, but shouldn't it really return a hash for hashes? Especially if thats its behavior in ruby, which Prototype is supposed to be modeled after. On Feb 3, 4:59 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi Brad, Sorry, I missed that Hash inherits from Enumerable (and I've filed a doc bug on it[1] and will fix it -- the doc page for Hash doesn't mention Enumerable). So I think that's your answer: Hash#filter is an alias for Enumerable#findAll[2], which is documented as returning an array, not a Hash, and so having it return a Hash would be breaking the contract. [1]http://prototype.lighthouseapp.com/projects/8886-prototype/tickets/535 [2]http://prototypejs.org/api/enumerable/findall Sorry again to have missed the Enumerable thing in the first place. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 12:25 am, Brad bradavo...@gmail.com wrote: It does. Hash still inherits from Enumerable, hence the usage of Hash#findAll(). - Brad On Feb 2, 1:34 am, ColinFine colin.f...@pace.com wrote: On Jan 31, 11:11 pm, Brad bradavo...@gmail.com wrote: Yup, found it -http://dev.rubyonrails.org/ticket/3592 It is indeed a bug in Prototype that hasn't been addressed. - Brad But it seems to me that it's gone away, because Hash no longer mixes in Enumerable, does it? Colin --~--~-~--~~~---~--~~ 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] div inside select/select tags?
Hi, I have a form with three drop down select boxes in it. I'd like the second box to populate when an option is selected in the first, and for the third to populate when an option is selected from the second. In the first select box, I use onchange to call a php script: select id='box1' onchange=ajaxUpdater('ajax_regions', '/ajax/ populate.php?show=monthid=' + getsel('box1') optionsomething/option /select Now, select id=box2 onchange=ajaxUpdater('ajax_day', '/ajax/ populate.php?show=daymonth=' + getsel('box2') div id='ajax_regions'/div /select , doesn't work, so I'm forced to use: div id='ajax_regions' select id=box2 /select /div , and get my php code to output something like: select id='box2' onchange=ajaxUpdater('ajax_day', '/ajax/ populate.php?show=daymonth=' + getsel('box2') option1/option /select Unfortunately, the onchange in the second select box doesn't fire. Is this because it doesn't parse the javascript outputted by the php code? Is there a way around this? Or perhaps a solution to the div inside select problem? Thanks in advance! --~--~-~--~~~---~--~~ 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 7 Enhanced Security
Hi John, I was hoping someone with a link would chime in here fairly quickly, but in the absense of that... This is a known problem. On IE, to implement the dom:loaded event, Prototype uses a deferred script tag: * * * * document.write(script id=__onDOMContentLoaded defer src=//:\/ script); $(__onDOMContentLoaded).onreadystatechange = function() { if (this.readyState == complete) { this.onreadystatechange = null; fireContentLoadedEvent(); } }; * * * * I believe there's an effort under way to change how dom:loaded is fired on IE so it doesn't do that, as this isn't the only problem it causes. HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 3, 4:43 pm, john.deig...@gmail.com john.deig...@gmail.com wrote: When loading a page that includes the prototype.js library (I've tried both 1.6.0.2 and 1.6.0.3), IE 7 pops up a dialog box that says Content from the Web site below is being blocked by Internet Explorer Enhanced Security Configuration and lists the URL http://;. That's right - no IP Name, 'localhost' or anything. Any attempt to add this to IE's allowed URLs fails since it's not a valid URL. A web page as simple as the one below exhibits this sympton. If I remove the link to prototype.js, the behavior goes away. html head titletesting/title script language=javascript type=text/javascript src=/javascript/ prototype.js/script /head body ptesting/p /body/html --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---