[Proto-Scripty] Re: Problem with Prototype 1.6.1 ( solved)
Thank you very much. I had the same problem and your fix did work. Cheers :-) On 12 oct, 22:16, Julius Šėporaitis jul...@seporaitis.net wrote: Hi, just wanted to post a quick note for those who maybe had problems like mine: - Prototype v.1.6.1 - Firefox 3.5 - JS Error: root.querySelectorAllis not a function (about line 3299 in prototype.js) This started to happen on Magento checkout pages, where the Accordion is and I don't know if this is a prototype bug or not, so - I don't know why and when this happens, but on my situation initially - the root variable is a string so it passes the initial check (root = root || document) causing problems later. :) Here's a solution. in the prototype.js prepend this line (~3299): results = $A(root.querySelectorAll(e)).map(Element.extend); so it looks like this: if(typeof root == string) root = $(root); results = $A(root.querySelectorAll(e)).map(Element.extend); I hope this gets helpful to someone. Cheers, Julius Seporaitis --~--~-~--~~~---~--~~ 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.jExtension
i've shorten the url... here it is: http://j.mp/WM2uR sorry! On Nov 9, 3:29 pm, speedpac...@gmail.com speedpac...@gmail.com wrote: I'm getting a 403 :( On Nov 9, 11:19 am, jacoz jacopo.nu...@gmail.com wrote: Hi, I want you to show my extension of your framework. If you want you can take a look at it (http://app.jaydns.com/ prototype.jextension/prototype.jextension.js) and if you're interested in you may also uso some of that features in your next release! :) Jacopo. --~--~-~--~~~---~--~~ 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.jExtension
Hi Tobie, thanks for you suggest: here it is: http://tr.im/EBEP Jacopo On Mon, Nov 9, 2009 at 9:35 PM, Tobie Langel tobie.lan...@gmail.com wrote: Hi jacoz, Seems like your Array#add would benefit from using Array#splice. https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/splice Best, Tobie --~--~-~--~~~---~--~~ 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] handler is undefined prototype.js handler.call(element, event) create wrapper
Hi , I am getting handler is undefined error in prototype.js Fire Bug pointing to this method in prototype.js handler.call(element, event) create wrapper. Can any one help me to solve this bug. --~--~-~--~~~---~--~~ 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] Multiple Ajax Request from the same page at the same time
hi all, i'm using prototype to perform 3 ajax request at the same time in the same page. the probeleme is i have the impression that my requests are not asynchronous : i call first a page named foo.php = do a sleep(40) and second a page named bar.php = echo toto; my javascript code: function test1(){ var MyAjax = new Ajax.Request(/foo.php,{ method: 'get', asynchronous:true, encoding: 'UTF-8', onSuccess: function(){ return; }, onFailure: function(){ return; }); } function test2(){ var MyAjax = new Ajax.Request(/bar.php,{ method: 'get', asynchronous:true, encoding: 'UTF-8', onSuccess: function(){ return; }, onFailure: function(){ return; }); } a href=# onclick=test1();test2();return false;Start Test/a i can see with firebug that the both request take 40s to be executed. or when i execute only test2(); it take 20ms. it's like the second request wait for the first to finish executing together ??!! any ideas ? --~--~-~--~~~---~--~~ 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
hi everybody i have an issue with ajax requests, when i send two requests one after the other the second one waits for the first one to finish , and of course i specify that they are asynchronous. anybody has an explanation for that ? --~--~-~--~~~---~--~~ 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] Stupid me cannot make Ajax.Request work
I am bumfuzzled by what should be a simple thing. I'm using prototype 1.6.1. The server side is working. The chkCardNum function gets called...but nothing fires. script type=text/javascript !-- function chkCardNum() { var notice = $('notice'); notice.update('Checking card number'); new Ajax.Request('https://www.somesite/cgi-bin/ajax.cgi', { method: 'post', onSuccess: function(transport) { if (transport.responseText.match(/OK/)) { notice.update('Card number passes').setStyle({ background: '#dfd' }); } else if (transport.responseText.match(/N0/)) { notice.update('The card number provided seems to have an error.').setStyle({ background: '#fdd' }); } }, onFailure: function(transport) { alert('Something went wrong'); } }); } //-- /script /head body div form name=testform method=post action=# pNumber: input align=bottom id=cardnum name=cardnum type=text size=20 value= class=monospc onchange=chkCardNum ()/p p id='notice'/p /form /div /body /html On the server end, this is all I'm using for this test. #!/usr/bin/perl print Content-type: text/html\n\n; print 'OK'; Why won't it work? --~--~-~--~~~---~--~~ 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] PeriodicalExecuter that doesn't stack
Im looking for a way to make PeriodicalExecuter not stack plus add in a max period setting. If PeriodicalExecuter could call a function instead of a url I could set/clear some flags so it would or wouldn't make the call depending on the flags. But I don't see how I could do that unless I could make it call a function and not a url. I think a max period would have to be hacked into prototype. I'm not sure on that one though. Anyone have any thoughts on how I could achieve this? Basically PeriodicalExecuter that doesn't stack plus a max period setting. Thanks, William --~--~-~--~~~---~--~~ 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: Stupid me cannot make Ajax.Request work
Ajax.Request will not follow XDR You have to make the request on the same domain and port else you will have to use a wrapper on the server side to go off domain Alex Mcauley http://www.thevacancymarket.com - Original Message - From: FourBrane men...@mentalware.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 6:15 AM Subject: [Proto-Scripty] Stupid me cannot make Ajax.Request work I am bumfuzzled by what should be a simple thing. I'm using prototype 1.6.1. The server side is working. The chkCardNum function gets called...but nothing fires. script type=text/javascript !-- function chkCardNum() { var notice = $('notice'); notice.update('Checking card number'); new Ajax.Request('https://www.somesite/cgi-bin/ajax.cgi', { method: 'post', onSuccess: function(transport) { if (transport.responseText.match(/OK/)) { notice.update('Card number passes').setStyle({ background: '#dfd' }); } else if (transport.responseText.match(/N0/)) { notice.update('The card number provided seems to have an error.').setStyle({ background: '#fdd' }); } }, onFailure: function(transport) { alert('Something went wrong'); } }); } //-- /script /head body div form name=testform method=post action=# pNumber: input align=bottom id=cardnum name=cardnum type=text size=20 value= class=monospc onchange=chkCardNum ()/p p id='notice'/p /form /div /body /html On the server end, this is all I'm using for this test. #!/usr/bin/perl print Content-type: text/html\n\n; print 'OK'; Why won't it work? --~--~-~--~~~---~--~~ 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: Multiple Ajax Request from the same page at the same time
Hi, Most browsers, and most servers, limit the number of simultaneous requests between the same two endpoints. Usually that limit is two requests at a time, although I've also seen it be just one. Some browsers let the user configure it. You can count on one (obvious -- well, to the extent you can count on networks at all); more than that and all bets are off. This isn't at the Prototype level, it's at the browser and server HTTP implementation level. HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Nov 10, 4:05 am, aerox amyne.berr...@me.com wrote: hi all, i'm using prototype to perform 3 ajax request at the same time in the same page. the probeleme is i have the impression that my requests are not asynchronous : i call first a page named foo.php = do a sleep(40) and second a page named bar.php = echo toto; my javascript code: function test1(){ var MyAjax = new Ajax.Request(/foo.php,{ method: 'get', asynchronous:true, encoding: 'UTF-8', onSuccess: function(){ return; }, onFailure: function(){ return; }); } function test2(){ var MyAjax = new Ajax.Request(/bar.php,{ method: 'get', asynchronous:true, encoding: 'UTF-8', onSuccess: function(){ return; }, onFailure: function(){ return; }); } a href=# onclick=test1();test2();return false;Start Test/a i can see with firebug that the both request take 40s to be executed. or when i execute only test2(); it take 20ms. it's like the second request wait for the first to finish executing together ??!! any ideas ? --~--~-~--~~~---~--~~ 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 request
Could be the web server ... Alot of web servers have a max number of paralell requests per user Alex Mcauley http://www.thevacancymarket.com - Original Message - From: ziva znibers...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 4:05 AM Subject: [Proto-Scripty] ajax request hi everybody i have an issue with ajax requests, when i send two requests one after the other the second one waits for the first one to finish , and of course i specify that they are asynchronous. anybody has an explanation for that ? --~--~-~--~~~---~--~~ 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 request
Hi, Nearly identical questions at almost the same time. :-) Here's the other one, where I've posted an answer: http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/6af62cd45d76f06e HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Nov 10, 4:05 am, ziva znibers...@gmail.com wrote: hi everybody i have an issue with ajax requests, when i send two requests one after the other the second one waits for the first one to finish , and of course i specify that they are asynchronous. anybody has an explanation for that ? --~--~-~--~~~---~--~~ 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: PeriodicalExecuter that doesn't stack
I wasn't aware that PeriodicalExecuter did call a URL... Ajax.PeriodicalUpdater does... If you want to just call a request every X seconds and change things just use PeriodicalExecutor or simply setTimeout Alex Mcauley http://www.thevacancymarket.com - Original Message - From: williamt willi...@rebelfactions.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 7:55 AM Subject: [Proto-Scripty] PeriodicalExecuter that doesn't stack Im looking for a way to make PeriodicalExecuter not stack plus add in a max period setting. If PeriodicalExecuter could call a function instead of a url I could set/clear some flags so it would or wouldn't make the call depending on the flags. But I don't see how I could do that unless I could make it call a function and not a url. I think a max period would have to be hacked into prototype. I'm not sure on that one though. Anyone have any thoughts on how I could achieve this? Basically PeriodicalExecuter that doesn't stack plus a max period setting. Thanks, William --~--~-~--~~~---~--~~ 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 request
And identical (almost) answers !! - how bizarre!!! 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: Tuesday, November 10, 2009 11:51 AM Subject: [Proto-Scripty] Re: ajax request Hi, Nearly identical questions at almost the same time. :-) Here's the other one, where I've posted an answer: http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/6af62cd45d76f06e HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Nov 10, 4:05 am, ziva znibers...@gmail.com wrote: hi everybody i have an issue with ajax requests, when i send two requests one after the other the second one waits for the first one to finish , and of course i specify that they are asynchronous. anybody has an explanation for that ? --~--~-~--~~~---~--~~ 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] Does $A('.classname').invoke('setValue',...) work on checkboxes?
Hi, I just bumped into a weird bug in my code. The thing is, that I am trying to update value of several checkboxes with a value received in a result of ajax call. Anyway, I have following construction: input name=someName class=APP_CHANGELOG_LOG_ID value= type=checkbox/ The checkboxes are unchecked by default. In the script I do: $$('.APP_CHANGELOG_LOG_ID').invoke('setValue',111); But the values stays intact. If I do this this way, it works: $$('.APP_CHANGELOG_LOG_ID').each( function(checkbox) { checkbox.value = 112 }); Is it me, or the setValue does not work on checkboxes? I just tried to do simple: $('publishChangelogSvn').setValue(111); in Firebug console, where publishChangelogSvn is a checkbox. It does not matter if it is checked or not. It just do not set the value. Docs does not mention anything about checkboxes... http://api.prototypejs.org/dom/form/element.html#setvalue-class_method Working with prototype 1.6.1. Do you have had the same issue? Best Regards SWilk --~--~-~--~~~---~--~~ 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: PeriodicalExecuter that doesn't stack
wow I must have been tired when I wrote that. I said PeriodicalExecuter but I really meant Ajax.PeriodicalUpdater So ya is there a way to make Ajax.PeriodicalUpdater not stack and to possibly give it a maximum frequency limit? -William On Nov 10, 2009, at 4:00 AM, Alex McAuley wrote: I wasn't aware that PeriodicalExecuter did call a URL... Ajax.PeriodicalUpdater does... If you want to just call a request every X seconds and change things just use PeriodicalExecutor or simply setTimeout Alex Mcauley http://www.thevacancymarket.com - Original Message - From: williamt willi...@rebelfactions.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 7:55 AM Subject: [Proto-Scripty] PeriodicalExecuter that doesn't stack Im looking for a way to make PeriodicalExecuter not stack plus add in a max period setting. If PeriodicalExecuter could call a function instead of a url I could set/clear some flags so it would or wouldn't make the call depending on the flags. But I don't see how I could do that unless I could make it call a function and not a url. I think a max period would have to be hacked into prototype. I'm not sure on that one though. Anyone have any thoughts on how I could achieve this? Basically PeriodicalExecuter that doesn't stack plus a max period setting. Thanks, William --~--~-~--~~~---~--~~ 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: PeriodicalExecuter that doesn't stack
You have answered your own question... In your original post you said that you could fix the problem if you could get Periodical to call a function instead of a url .. and what i suggested does just that ... I am not sure i understand what you mean by stacking As for frequency: you dont need to worry about it if you are usig periodical executor and opposed to updater Alex Mcauley http://www.thevacancymarket.com - Original Message - From: William Taylor willi...@rebelfactions.com To: prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 2:06 PM Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack wow I must have been tired when I wrote that. I said PeriodicalExecuter but I really meant Ajax.PeriodicalUpdater So ya is there a way to make Ajax.PeriodicalUpdater not stack and to possibly give it a maximum frequency limit? -William On Nov 10, 2009, at 4:00 AM, Alex McAuley wrote: I wasn't aware that PeriodicalExecuter did call a URL... Ajax.PeriodicalUpdater does... If you want to just call a request every X seconds and change things just use PeriodicalExecutor or simply setTimeout Alex Mcauley http://www.thevacancymarket.com - Original Message - From: williamt willi...@rebelfactions.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 7:55 AM Subject: [Proto-Scripty] PeriodicalExecuter that doesn't stack Im looking for a way to make PeriodicalExecuter not stack plus add in a max period setting. If PeriodicalExecuter could call a function instead of a url I could set/clear some flags so it would or wouldn't make the call depending on the flags. But I don't see how I could do that unless I could make it call a function and not a url. I think a max period would have to be hacked into prototype. I'm not sure on that one though. Anyone have any thoughts on how I could achieve this? Basically PeriodicalExecuter that doesn't stack plus a max period setting. Thanks, William --~--~-~--~~~---~--~~ 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] Sorting and z-index problem
I'm using scriptaculous to make page elements resortable through dragging and I'm running into a problem with z-index and the YUI split button. I know it could be difficult to say of the problem is with the YUI code or scriptaculous code but I think it's scriptaculous code (or my use of it) and the YUI widgets just make the problem visible. The problem is that, if I make the items sortable (by clicking Make Sortable in the sample) the drop down menus can appear behind other items. The behavior is different in IE7 and FF3.5. In IE7 the drop down menus work until you click Make Sortable which brings in the scriptaculous code. Once you've made the items sortable you can see the menus popup behind other buttons. In FF3.5 the menus still work after their divs are made sortable, but if you drag the 2nd item to be the first item, the new 1st items menu comes up behind the 2nd item's button. You can see this behavior in my small sample program here: http://giganto-corp.com/Sorting/sample.html Here's why I think Scriptaculous is the issue. In firefox, if you use firebug, you can see that the draggable div elements have no specified z-index. After you drag the 2nd item to the 1st position, firebug will show you that the dragged item now has an assigned z-index of 0 and you can see that the menu does not work. It you eliminate that property using firebug you'll see that the menu now works. If the dragging code would return the dragged element to it's original state regarding the z-index, I don't think you'd have the problem. At least not in firefox. In IE7, I'm not sure if the problem is the same. Since IE7 breaks without the dragging then it's something that's being done just making sorting possible. Both browsers work correctly before you make the items sortable. Sorry for the long post but I wanted to include all the info that I have. You can see all the code at the link above. --~--~-~--~~~---~--~~ 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: PeriodicalExecuter that doesn't stack
To stop the stacking just use asynchronous flag and set it to false... Though it does go against the AJAX it will work... Perhaps you can get around the decay/frequency with somehting else Alex Mcauley http://www.thevacancymarket.com - Original Message - From: William Taylor To: prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 2:48 PM Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack This will call a function and not a url ? new Ajax.PeriodicalUpdater(container, url[, options])stacking: ie multiple request will stack on top of each other whether or not the previous one has completed or not. If this is making a request say every second there is the possibility that the request may not finish in time before the next one gets fired off. I need a way to prevent that. Im using PeriodicalUpdater not PeriodicalExecutor. I need the frequency and decay that Updater provides. Thanks, William On Nov 10, 2009, at 6:17 AM, Alex McAuley wrote: You have answered your own question... In your original post you said that you could fix the problem if you could get Periodical to call a function instead of a url .. and what i suggested does just that ... I am not sure i understand what you mean by stacking As for frequency: you dont need to worry about it if you are usig periodical executor and opposed to updater Alex Mcauley http://www.thevacancymarket.com - Original Message - From: William Taylor willi...@rebelfactions.com To: prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 2:06 PM Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack wow I must have been tired when I wrote that. I said PeriodicalExecuter but I really meant Ajax.PeriodicalUpdater So ya is there a way to make Ajax.PeriodicalUpdater not stack and to possibly give it a maximum frequency limit? -William On Nov 10, 2009, at 4:00 AM, Alex McAuley wrote: I wasn't aware that PeriodicalExecuter did call a URL... Ajax.PeriodicalUpdater does... If you want to just call a request every X seconds and change things just use PeriodicalExecutor or simply setTimeout Alex Mcauley http://www.thevacancymarket.com - Original Message - From: williamt willi...@rebelfactions.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 7:55 AM Subject: [Proto-Scripty] PeriodicalExecuter that doesn't stack Im looking for a way to make PeriodicalExecuter not stack plus add in a max period setting. If PeriodicalExecuter could call a function instead of a url I could set/clear some flags so it would or wouldn't make the call depending on the flags. But I don't see how I could do that unless I could make it call a function and not a url. I think a max period would have to be hacked into prototype. I'm not sure on that one though. Anyone have any thoughts on how I could achieve this? Basically PeriodicalExecuter that doesn't stack plus a max period setting. Thanks, William --~--~-~--~~~---~--~~ 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: PeriodicalExecuter that doesn't stack
If I turn off async will that only block on that one call or will it block other calls from happening also? On Nov 10, 2009, at 7:27 AM, Alex McAuley wrote: To stop the stacking just use asynchronous flag and set it to false... Though it does go against the AJAX it will work... Perhaps you can get around the decay/frequency with somehting else Alex Mcauley http://www.thevacancymarket.com - Original Message - From: William Taylor To: prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 2:48 PM Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack This will call a function and not a url ? new Ajax.PeriodicalUpdater(container, url[, options]) stacking: ie multiple request will stack on top of each other whether or not the previous one has completed or not. If this is making a request say every second there is the possibility that the request may not finish in time before the next one gets fired off. I need a way to prevent that. Im using PeriodicalUpdater not PeriodicalExecutor. I need the frequency and decay that Updater provides. Thanks, William On Nov 10, 2009, at 6:17 AM, Alex McAuley wrote: You have answered your own question... In your original post you said that you could fix the problem if you could get Periodical to call a function instead of a url .. and what i suggested does just that ... I am not sure i understand what you mean by stacking As for frequency: you dont need to worry about it if you are usig periodical executor and opposed to updater Alex Mcauley http://www.thevacancymarket.com - Original Message - From: William Taylor willi...@rebelfactions.com To: prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 2:06 PM Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack wow I must have been tired when I wrote that. I said PeriodicalExecuter but I really meant Ajax.PeriodicalUpdater So ya is there a way to make Ajax.PeriodicalUpdater not stack and to possibly give it a maximum frequency limit? -William On Nov 10, 2009, at 4:00 AM, Alex McAuley wrote: I wasn't aware that PeriodicalExecuter did call a URL... Ajax.PeriodicalUpdater does... If you want to just call a request every X seconds and change things just use PeriodicalExecutor or simply setTimeout Alex Mcauley http://www.thevacancymarket.com - Original Message - From: williamt willi...@rebelfactions.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 7:55 AM Subject: [Proto-Scripty] PeriodicalExecuter that doesn't stack Im looking for a way to make PeriodicalExecuter not stack plus add in a max period setting. If PeriodicalExecuter could call a function instead of a url I could set/clear some flags so it would or wouldn't make the call depending on the flags. But I don't see how I could do that unless I could make it call a function and not a url. I think a max period would have to be hacked into prototype. I'm not sure on that one though. Anyone have any thoughts on how I could achieve this? Basically PeriodicalExecuter that doesn't stack plus a max period setting. Thanks, William --~--~-~--~~~---~--~~ 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: PeriodicalExecuter that doesn't stack
It makes the call asynchronous (it will only do one thing at a time) .. so if you had a stack of 8 ajax calls it would go through them one by one in synchronous fashion until they are done... If you have other ajax calls going on in the page from different functions - this one would sit in the stack until the interpreter is ready and execute then (AFAIK) setting the flag on one function will not mess with other ajax calls on the page.. If you need to check other calls (the number of) use Ajax.ActiveRequestCount - it holds a variable (integer) of how many Ajax requests are going on in the page at any one time. HTH Alex Mcauley http://www.thevacancymarket.com - Original Message - From: William Taylor To: prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 4:01 PM Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack If I turn off async will that only block on that one call or will it block other calls from happening also? On Nov 10, 2009, at 7:27 AM, Alex McAuley wrote: To stop the stacking just use asynchronous flag and set it to false... Though it does go against the AJAX it will work... Perhaps you can get around the decay/frequency with somehting else Alex Mcauley http://www.thevacancymarket.com - Original Message - From: William Taylor To: prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 2:48 PM Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack This will call a function and not a url ? new Ajax.PeriodicalUpdater(container, url[, options])stacking: ie multiple request will stack on top of each other whether or not the previous one has completed or not. If this is making a request say every second there is the possibility that the request may not finish in time before the next one gets fired off. I need a way to prevent that. Im using PeriodicalUpdater not PeriodicalExecutor. I need the frequency and decay that Updater provides. Thanks, William On Nov 10, 2009, at 6:17 AM, Alex McAuley wrote: You have answered your own question... In your original post you said that you could fix the problem if you could get Periodical to call a function instead of a url .. and what i suggested does just that ... I am not sure i understand what you mean by stacking As for frequency: you dont need to worry about it if you are usig periodical executor and opposed to updater Alex Mcauley http://www.thevacancymarket.com - Original Message - From: William Taylor willi...@rebelfactions.com To: prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 2:06 PM Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack wow I must have been tired when I wrote that. I said PeriodicalExecuter but I really meant Ajax.PeriodicalUpdater So ya is there a way to make Ajax.PeriodicalUpdater not stack and to possibly give it a maximum frequency limit? -William On Nov 10, 2009, at 4:00 AM, Alex McAuley wrote: I wasn't aware that PeriodicalExecuter did call a URL... Ajax.PeriodicalUpdater does... If you want to just call a request every X seconds and change things just use PeriodicalExecutor or simply setTimeout Alex Mcauley http://www.thevacancymarket.com - Original Message - From: williamt willi...@rebelfactions.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Tuesday, November 10, 2009 7:55 AM Subject: [Proto-Scripty] PeriodicalExecuter that doesn't stack Im looking for a way to make PeriodicalExecuter not stack plus add in a max period setting. If PeriodicalExecuter could call a function instead of a url I could set/clear some flags so it would or wouldn't make the call depending on the flags. But I don't see how I could do that unless I could make it call a function and not a url. I think a max period would have to be hacked into prototype. I'm not sure on that one though. Anyone have any thoughts on how I could achieve this? Basically PeriodicalExecuter that doesn't stack plus a max period setting. Thanks, William --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us
[Proto-Scripty] Re: Does $A('.classname').invoke('setValue',...) work on checkboxes?
Hi, I found where is the problem. I assumed, that the Form.Element.setValue method sets the value of an element. In case of checkboxes that is not true. The method changes the state of checked/unchecked instead, and leaves the value attribute unchanged. The example might be found here: http://tsalarioth.art.pl/~sw/setValueTest.html As you can see, if you click on the button set value of checkbox to: with empty input, the checkbox is unchecked. If the value is not empty, then checkbox will be checked. I do not understand why this behaviour was chosen, but I understand that it can't be changed now, as it would break backward compatibility. Anyway I think the setValue method needs better documentation, as it is now a little bit misleading. I will open a lighthouse DOC ticket for this. Best regards, SWilk --~--~-~--~~~---~--~~ 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 Unit Testing Framworks
Hi All, I have been trying to find a Javascript Unit testing framework that works with Prototype. I initially tried JsUnit, but it would appear that there is a namespace conflict with the asserts, because as soon as I include the prototype file, all the previously passing test fail, with errors. I have searched the forums and did note that there is mention of unittest.js in some of them but have been unable to find said file. The posts where is was mentioned were also quite old. I am really more interested in what others are using to test their Prototype created classes via unit testing. Any thoughts of help would be most appreciated. -- daff SOFTWARE ENGINEER andrew 'daff' niles | spider tracks ltd | 117a the square po box 5203 | palmerston north 4441 | new zealand P: +64 6 353 3395 | M: +64 210 255 8576 E: d...@spidertracks.co.nz mailto:d...@spidertracks.co.nz W: www.spidertracks.com http://www.spidertracks.com --~--~-~--~~~---~--~~ 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 - which chars not accepted?
I have a question to this prototype function: function isJSON() { var str = this; if (str.blank()) return false; str = this.replace(/\\./g, '@').replace(/[^\\\n\r]*/g, ''); return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); } If I send a JSON { 'str': 'pThis is a line with \n linefeed/p' } I do get an error. The same is, if the JSON is encoded to { 'str': 'pThis is a line with %0A linefeed/p' }. I need to delete the linefeed or I need to replace to 'br /'. I do not understand the regular expression above, because I want avoid to use other chars, which results in errors. Manfred -- http://www.comparat.de http://www.athesios.de http://twitter.com/COMPARAT --~--~-~--~~~---~--~~ 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 Unit Testing Framworks
We use JsUnit with prototype successfully. Could you post any additional info about the errors you are getting? What version of prototype/jsunit/browser are you using? I will say that JsUnit seems to be basically on life support so you might want to look in to something else. I've recently been looking in to the YUI Test library which seems very full featured. http://developer.yahoo.com/yui/3/test/ Joe On Nov 10, 1:51 pm, Daff d...@spidertracks.co.nz wrote: Hi All, I have been trying to find a Javascript Unit testing framework that works with Prototype. I initially tried JsUnit, but it would appear that there is a namespace conflict with the asserts, because as soon as I include the prototype file, all the previously passing test fail, with errors. I have searched the forums and did note that there is mention of unittest.js in some of them but have been unable to find said file. The posts where is was mentioned were also quite old. I am really more interested in what others are using to test their Prototype created classes via unit testing. Any thoughts of help would be most appreciated. -- daff SOFTWARE ENGINEER andrew 'daff' niles | spider tracks ltd | 117a the square po box 5203 | palmerston north 4441 | new zealand P: +64 6 353 3395 | M: +64 210 255 8576 E: d...@spidertracks.co.nz mailto:d...@spidertracks.co.nz W:www.spidertracks.comhttp://www.spidertracks.com --~--~-~--~~~---~--~~ 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] why does javascript lie?
Ok, this is really annoying me... When you make changes to form elements, and refresh the page, they don't go back to their defaults regardless of what the html says selected is... My plan was to have prototype set my form elements to their selected value when the page loads, however when I implemented this, it did not work... I could not understand why. So, for a test.. I went to one of my pages and selected option 2 of a select... then in the console I did: $F('my_select'); 2 ... ok cool... Refreshed the page... Looked at the html: option value=1 selected=selected1/option ... guess what? $F('my_select'); 2 LIAR why does it lie??? -patrick --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---