[Proto-Scripty] Re: BGEffects: Animate your background images!
Pretty neat job, thanks for the advice... On 13 nov, 13:12, Pedro De Almeida almei...@gmail.com wrote: Hi all, I just wanted to share with you my BGEffects component for script.aculo.us. BGEffects is a library for creating perspective animations (aka parallax effect) using background images from nested (but not only) containers. You can see it in action on the project page at:http://www.almeida.ch/projects/BGEffects/ BGEffects was initially released for Scripty2 but, as development seems to be in standby mode, I decided to port it to script.aculo.us and jQuery. Currently, I am still working on some performance issues and trying to delegate animation to native CSS3 transitions when available. Feel free to review the code and report any bugs, comments or suggestions. Have fun! Pedro De Almeida -- 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 cache problem with Ajax
i know you resolve your problem but It wont be easy if you delete from the dom the img / tag storing the actual images then... create new new Images() append to the div and finally add a query cheat link??? just a shot... best ncubica... On 29 sep, 13:28, Phil Petree phil.pet...@gmail.com wrote: I didnt address the caching because I had to look to see if I could find where I had saved this link off the last time I had this problem... found it! The caching is probably on the browser side, not the server side. Setting the server side cache variables will only affect the page reload. The browser knows better than to cache on refresh/reload BUT technically, to the browser, you are not reloading and since the image has the same name it doesn't really know that you need a refresh. This guy had a solution that worked for me:http://www.irt.org/script/416.htm I have also used the cheap trick of adding a random query string on to the end of the image url:http://www.somedomain.com/images/newname.jpg?id=random_numberand since this will always generate a new url, the browser will refresh the image. On Thu, Sep 29, 2011 at 1:04 PM, Phil Petree phil.pet...@gmail.com wrote: This is an interesting problem... my first reaction is that you'd want to use onComplete to update the div's instead of onSuccess. Test this with a couple of alerts and see which one gets called first and which is last (just as onCreate is the first call, onComplete is the last). To my way if thinking, if you wait until onComplete gets triggered before you do any UI updates, all the images on the server should be properly in place. On Thu, Sep 29, 2011 at 12:15 PM, Richard Quadling rquadl...@gmail.comwrote: On 29 September 2011 16:58, Chris Sansom ch...@highway57.co.uk wrote: On 29 Sep 2011, at 15:51, Richard Quadling wrote: Does ALL the JS work take place inside the onSuccess callback? The Back in JS bit has to be part of the onSuccess callback otherwise it will happen out of sequence. The A in AJAX is potentially the hiccough here. That's what I suspected but yes, all the 'back in JS' stuff does indeed happen in the onSuccess. (I also tried onComplete, but got the same result.) I think the problem may be that the div, inevitably, is replaced right at the end of the process (at the end of the onSuccess), and only then is the offending img tag unleashed, calling either the image itself or my little php script... but then I'd have thought preloading it might help, but it doesn’t seem to. I also tried loading it via a php exec() call to the image script in advance of returning the output string to JS, but that didn’t help. What also convinces me that you're right about the A in AJAX is that when, for testing, I put a sleep(5) in the image script - which should hold it up by a whole 5 seconds - the div is still replaced immediately. When I first load the page (which also calls this script), I get a broken image icon where the image should have been, replaced after 5 seconds by the image, but when the div is replaced by the ajax call that doesn’t happen - I just get no change of image as before. It really would be /so/ nice if I could get this working! It's for a password-protected CMS, so the world at large will never get the benefit, and I could simply reload the whole page instead of just the one div, but it's become a challenge! Create a test case where it goes wrong. Write new clean code that doesn't want/need/use anything from the main project. At best, this will be a small HTML page with some divs and images, a JS file to allow the onclick to fire the AJAX code, along with the onsuccess and the server side code to handle the request and to return the new HTML markup. Without seeing the server and client side code, you are going to be stuck with a limited level of support. If you can't reduce the problem to something that can be read, I doubt anyone can realistically provide any more ideas on this. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- 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. -- 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
[Proto-Scripty] Re: Future of Prototype.js
ok ... So T.J. I know you not have the ultimate decision for designate a candidate for any position at Prototype community but certanly you are the most near with the core team. So I would like to know if you could email one of them and try to start designate person for revitalize this community... I have a good widgets base with prototype and I could build more... that's not a problem... but we need to designate a OFFICIAL Site for hosted documentation and more important EXAMPLES. scripteka is a good place to fine this, BUT doesn't have any space for comments or is NOT organice in a way where you can easy find the widget you are expect or more important ask to the community where to find it or maybe build it by more experience developer, I think is why jquery have grow that huge beside of the money behind it. Cause a lot of designers with a lack knowledge of javascript can use it... happend with php vs java... and a lot more examples out there, We have to reinvent the way of how we communicate prototype... to everybody out there So please talk with them, I have a fully compromise for work with this project a least 1 year... and this is because I explote my javascript knowledge because this framework... and care about it. Best Ncubica... On 27 sep, 08:58, Walter Lee Davis wa...@wdstudio.com wrote: On Sep 27, 2011, at 12:00 AM, Marty Amberg wrote: One more thing. Chevy and Ford and Honda, make lots of cars but that does not mean they produce the best vehicles. It be much for fun driving a Ferrari and they don't make as many. The point being, just cause something is popular does not mean its the best and there are a lot of other frameworks out there.. One talking point that got trotted out lots of times during the Dark Ages of Macintosh vs. Windows was that cockroaches were the largest population in numbers, but you wouldn't want one to write you a sonnet. Walter -- 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: Future of Prototype.js
Hi TJ, I would like to help in the implementation of the UI interface for prototype, who do you think can lead this feature? I'm think I'm best using prototype than working on the core, I could help in this stage, and also I would love a renaissance of protoype. I think in the same way of you... we have to do something in a way of help Andrew... Best Nahum On Sep 23, 11:19 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, This was _JUST_ gone into, in depth:http://groups.google.com/group/prototype-scriptaculous/browse_thread/... I think this is a fair-ish (but incomplete) summary: 1. Prototype is a spare-time activity for a very small number of people. In fact, at the moment I think it's mostly just Andrew, and he has other things he does (like, you know, hold down a full-time job). Just recently the project largely lost another major contributor to his job and family commitments. 2. Andrew has no plans to stop working on Prototype on any time soon. 3. Prototype work is done in fits and spurts, long periods of inactivity followed by a period (couple of weeks) of feverish activity. 4. jQuery has multiple corporate sponsors, not least Microsoft, and there are people paid to work on it full time. Thus it's able to be much more up-to-date and proactive than Prototype. A quote from Andrew in the thread linked above: On Aug 23, 1:07 am, Andrew Dupont googlegro...@andrewdupont.net wrote: I will say, though, that if we're crowning winners and losers, then jQuery won a long time ago. It is certainly the _de facto_ JavaScript library for web development. The good news is that the losers of the war aren't looking so bad; libraries like Prototype, MooTools, and Dojo still have loyal user bases, and I doubt they're going away. My personal perspective, for what it's worth (e.g., possibly exactly what you're paying for it, nothing :-) ) is based on some data points: 1. The last blog post on the Prototype blog was 10 months ago. 2. The library has had basically no activity since v1.7 was released November 2010. 3. The most recent three releases were: v1.7 - November 2010 v1.6.1 - September 2009 v1.6.0.3 - September 2008 Three releases, in total, including dot releases, in the last three years. Compare with 16 releases (four major ones) of jQuery in that time period (v1.3 through v1.6.4). 4. Absolute use and trends: Absolute use:http://trends.builtwith.com/javascript Prototype trend:http://trends.builtwith.com/javascript/Prototype jQuery trend:http://trends.builtwith.com/javascript/JQuery 5. Questions tagged on StackOverflow: jQuery: 114,842 Prototype: 2,152 ...which could, of course, just mean that Prototype is so much better it generates fewer questions, or that people using Prototype don't use StackOverflow, or that people are mis-tagging JavaScript questions jquery (I see that a fair bit), or some combination of those. Does all this mean Prototype is dead? No, not a bit of it. But it has a very small staff with other major demands on their time, and has no funding. Andrew's quite clear that it's not dead, and also that it will continue in much the way it has these last three years. I made the business, not technical, decision years ago to use jQuery rather than Prototype. In many ways I prefer Prototype, although there are some good ideas in jQuery (also some phenomenally bad ones, such as how overloaded the API is). I still pitch in and moderate this mailing list, and still answer questions, but for me the business case is: Which library amongst the large number out there is kept up-to- date; jumps on testing new browser versions for compatibility; has a large ecosystem of code I can use; has a large pool of talent I can hire or contract; has well-maintained, frequently updated and extended, reliable, and documented UI helpers (jQueryUI vs. Script.aculo.us); and is likely to be around long-term without heroic effort from a single individual, or a small set of individuals. So I went with jQuery, despite preferring Prototype in many ways. [I also looked at Dojo, ExtJS, (more recently) Closure, and a few others.] It could have gone another way. People like me could have done more to contribute to the project; leadership could have focussed on core functionality, community-building, and developer (um) development rather than side-issues; corporate sponsorship could have been courted and perhaps ultimately found. But that didn't happen, and it didn't happen because the Prototype community and leadership didn't make it happen (perhaps corporate sponsorship wasn't desirable; fair 'nuff) and because luck didn't go Prototype's way. (And don't think luck isn't a big factor here.) I have nothing but respect and admiration for Andrew and everyone else who has made Prototype what it is. And there's absolutely no reason not to use it on your websites if you test with your target browsers and it does what
[Proto-Scripty] Re: Prototype's evolution
Please somebody from the prototype dev core team answer us!!! we love prototype, but is dying!!! On Aug 18, 7:57 pm, Brian Williams brianw1...@gmail.com wrote: that's very good point, Phil. I've been reluctant to say anything on this, but maybe another voice will take a step closer to an action. Recently Prototype lost one of its largest clients -- Magento. Starting with v2.0 Magento will be using jQuery. This is a big blow to the framework, imo (I've been doing steady Magento work for the past 2.5 years) and nearly every single frontend person I have worked with has made jQuery into working in Magento to get the animation effects that they want, etc. It seems that everyone wants something more from this framework -- forking is *always* an option -- look at Kohana -- started as a fork of Code Igniter because CI didn't have things some people wanted. Now look at FuelPHP -- a fresh new php5.3 based framework based on CI, Kohana with a dash of RoR thrown in. If there are people with the knowledge and the desire and the experience to say fork-it and go, I say more power to you -- just make sure you map it out and plan strategically, and where ever possible make it somewhat backwards compatible. Also, if you could get away from that whole $ magic function (say put it inside a wrapper?) -- that would make a LOT of frontend devs happy and dump a lot of confusion and headaches for some people. Of course just 2 cents from someone who really sucks at JS and is beyond inactive in the community, so feel free to ignore me. On Thu, Aug 18, 2011 at 7:23 PM, Phil Petree phil.pet...@gmail.com wrote: I believe this is the 3rd time this subject has been brought up in the past year and, to my knowledge, devs have made no comment nor provided any direction so, as they say, no answer is an answer! On Thu, Aug 18, 2011 at 1:20 PM, shellster shellsterd...@gmail.comwrote: Well written. As an opensource developer (aside from my day job), I am aware of the danger of caring too much about what the user thinks. I am also aware of the potential dangers of forking a project. What I want is some sort of answer from the Prototype devs on how they want the community to pitch in. Do they want us to develop our own plugin websites, or do they want us to create an interface for their main site? Do they want to develop it? Do they want us to develop a comprehensive library as an extension of Prototype or as part of Prototype? Will they ever official endorse such efforts (assuming certain obvious caveats)? Unfortunately, it seems that the devs don't care to provide any feedback on any of these issues. I am not expecting anything more from the devs, but as a matter of courtesy I would like them to explain how they would like us to get involved instead of users just doing their own thing. Also, the answer of submit a patch for consideration doesn't really cut it in this case, because I've personally seen patches never get acknowledged, let alone get added. I've yet to see a patch get added. Users aren't going to waste their time writing and cleaning up code, if there's not at least a good chance of their patch being considered. In short PrototypeJS needs to address these questions before the project either falls into disuse or the users take matters into their own hands and strike out willy-nilly and fully fork the project. On Aug 17, 8:04 am, Phil Petree phil.pet...@gmail.com wrote: This is the same old discussion that's been going on for months and I wonder if it will ever get resolved to the satisfaction of those of us who use the tool to enhance our sites. From what I can tell, there seems to be an uber-geek philosophy of make it better and they will come and, to a degree that's correct. The problem is, history is filled with technically superior products that ultimately failed because of poor marketing and/or not listening to their users (betamax vs vhs and myspace vs facebook for two glowing examples). My fear is that prototype will ultimately face the same fate... be a technically superior product with a few guys pitching in and carrying the weight (anyone who follows this feed knows who the guys are who always pitch in with an answer) while marketing, support, easy access to developed libs and all the other goodies go ignored which causes adoption of the product to dwindle because these things exist on another platform. Why is this important? I have a buddy that has a very successful site written in cold fusion, he developed the site just to familiarize himself with the language. Turns out, the site took off, he quit is day job, ran the site, and recently got a contract for heaps and tons of $$$ for the site. The catch? He has to rewrite the site in either .php or .net because the buyer won't take it as a CF site. Does anyone
[Proto-Scripty] Re: Prototype's evolution
btw... google groups is closing... does anyone knows what is gonna happen with this email group?? On Aug 19, 2:02 am, ncubica ncub...@gmail.com wrote: Please somebody from the prototype dev core team answer us!!! we love prototype, but is dying!!! On Aug 18, 7:57 pm, Brian Williams brianw1...@gmail.com wrote: that's very good point, Phil. I've been reluctant to say anything on this, but maybe another voice will take a step closer to an action. Recently Prototype lost one of its largest clients -- Magento. Starting with v2.0 Magento will be using jQuery. This is a big blow to the framework, imo (I've been doing steady Magento work for the past 2.5 years) and nearly every single frontend person I have worked with has made jQuery into working in Magento to get the animation effects that they want, etc. It seems that everyone wants something more from this framework -- forking is *always* an option -- look at Kohana -- started as a fork of Code Igniter because CI didn't have things some people wanted. Now look at FuelPHP -- a fresh new php5.3 based framework based on CI, Kohana with a dash of RoR thrown in. If there are people with the knowledge and the desire and the experience to say fork-it and go, I say more power to you -- just make sure you map it out and plan strategically, and where ever possible make it somewhat backwards compatible. Also, if you could get away from that whole $ magic function (say put it inside a wrapper?) -- that would make a LOT of frontend devs happy and dump a lot of confusion and headaches for some people. Of course just 2 cents from someone who really sucks at JS and is beyond inactive in the community, so feel free to ignore me. On Thu, Aug 18, 2011 at 7:23 PM, Phil Petree phil.pet...@gmail.com wrote: I believe this is the 3rd time this subject has been brought up in the past year and, to my knowledge, devs have made no comment nor provided any direction so, as they say, no answer is an answer! On Thu, Aug 18, 2011 at 1:20 PM, shellster shellsterd...@gmail.comwrote: Well written. As an opensource developer (aside from my day job), I am aware of the danger of caring too much about what the user thinks. I am also aware of the potential dangers of forking a project. What I want is some sort of answer from the Prototype devs on how they want the community to pitch in. Do they want us to develop our own plugin websites, or do they want us to create an interface for their main site? Do they want to develop it? Do they want us to develop a comprehensive library as an extension of Prototype or as part of Prototype? Will they ever official endorse such efforts (assuming certain obvious caveats)? Unfortunately, it seems that the devs don't care to provide any feedback on any of these issues. I am not expecting anything more from the devs, but as a matter of courtesy I would like them to explain how they would like us to get involved instead of users just doing their own thing. Also, the answer of submit a patch for consideration doesn't really cut it in this case, because I've personally seen patches never get acknowledged, let alone get added. I've yet to see a patch get added. Users aren't going to waste their time writing and cleaning up code, if there's not at least a good chance of their patch being considered. In short PrototypeJS needs to address these questions before the project either falls into disuse or the users take matters into their own hands and strike out willy-nilly and fully fork the project. On Aug 17, 8:04 am, Phil Petree phil.pet...@gmail.com wrote: This is the same old discussion that's been going on for months and I wonder if it will ever get resolved to the satisfaction of those of us who use the tool to enhance our sites. From what I can tell, there seems to be an uber-geek philosophy of make it better and they will come and, to a degree that's correct. The problem is, history is filled with technically superior products that ultimately failed because of poor marketing and/or not listening to their users (betamax vs vhs and myspace vs facebook for two glowing examples). My fear is that prototype will ultimately face the same fate... be a technically superior product with a few guys pitching in and carrying the weight (anyone who follows this feed knows who the guys are who always pitch in with an answer) while marketing, support, easy access to developed libs and all the other goodies go ignored which causes adoption of the product to dwindle because these things exist on another platform. Why is this important? I have a buddy that has a very successful site written in cold fusion, he developed the site just to familiarize himself with the language. Turns out, the site took
[Proto-Scripty] Re: Prototype's evolution
T.J. As Always you're right sorry is not true google group is closing. Thanks for the note. ;) On Aug 19, 4:06 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, On Aug 19, 8:08 am, ncubica ncub...@gmail.com wrote: btw... google groups is closing... does anyone knows what is gonna happen with this email group?? Where did you hear that? I don't see anything about it on the Groups main page[1] or help[2], or the Wikipedia page[3]. They recently rolled out a new UI update[4]. I don't think Groups is closing. It's clearly not a flagship Google product, it's slow as all get-out, administering groups can only be called byzantine, but... They have removed some features[5] (the about box on the group's Home page, group pages, and group files -- most of which are redundant with other, better, Google products) quite a long time back and they're finally deleting the files related to them at the end of the month (until then zips are still available for download), but Groups itself doesn't seem to be closing. [1]http://groups.google.com/ [2]http://groups.google.com/support [3]http://en.wikipedia.org/wiki/Google_Groups [4]http://www.groups.google.com/support/bin/topic.py?topic=1046505 [5]http://groups.google.com/support/bin/answer.py?answer=1046705 You know, when I started out, I didn't expect or intend this note to be so long or to have so many references. It just kept...growing... :-) Sorry about that. Best, -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / 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] Re: Prototype Vs. JQuery
@lvdesign you comment sound more that an advertising than an real prove for why to move to jquery, I mean seriously I don't know anything that you CAN'T do with prototype and do with jquery cause at finally both are javascript, so the question is more about what is the real future of prototype, why stay keep in touch with this library or try to move in a new one. I mean if you have to talk about libraries you have to realize that YUI is really better option than jquery in several terms and is running in an architectural made by the famous Douglas Crockford father of JSON. But here the question is what's happend with prototype??? does anyone can help us??? On May 1, 4:33 am, lvdesign mail...@lvdesign.com.fr wrote: Hello, For me the problem is actualy Why are you using Prototype when jQuery is more efficient, intuitive et en plus more developed? And remember you, jQuery accept other library with .noConflict() And you can manage RoR with jQueryhttp://jimneath.org/2008/06/18/using-jquery-with-ruby-on-rails.html So for me try to do something with Proto is a challenge because jQuery is so smart. cordialy LV On 1 mai, 02:45, joe t. thooke...@gmail.com wrote: The short answer is that there's no short answer. There's not really anything that either library can do that the other can't. It's mostly a question of the requirements of the project, or familiarity with either library's approach, etc. There's no conclusive answer any answer you do get will be loaded with facts about each, but no single knockout argument to use one or the other. -joe t. On Apr 29, 2:22 pm, kstubs kst...@gmail.com wrote: Why Prototype over JQuery? I am an avid fan of Prototype and have never used JQuery, but JQuery seems to be so popular. Is it just that, popular? I love prototype, and learning something new and magical every day it seems, but is there something *better* that Prototype does that JQuery doesn't, or vice-a-versa? Karl.. -- 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 1.7 EvalJSON Error Sintax on Date Eval
I don't think that is the reason because actually is an array of objects and without the When properties works, Im mean if you do something like [ {Aspirante_id:37, AspirantesComentarios_id: 6, Comentario:asdfadsf, Who:nahum }, {Aspirante_id:38, AspirantesComentarios_id: 7, Comentario:another string, Who:you } ] Look I removed the when property and works you can see the images of the debugger here[ http://ibp.mx/lnk/attch/debug.jpg ]. so I thinks is something more about the date type or format, and been work before with this type but I dont't know why is saying syntax error thanks for the answer Luke and sorry for the format. On Jan 7, 3:54 am, Luke kickingje...@gmail.com wrote: Afaik a JSON-Object (or string) must be wrapped in {}. What you have is an array (your string's wrapped with [ ]). Try: { [ {Aspirante_id:37, AspirantesComentarios_id: 6, Comentario:asdfadsf, Who:nahum, When: new Date(1294268679000) } ] } or {[{Aspirante_id:37,AspirantesComentarios_id: 6,Comentario:asdfadsf,Who:nahum,When:new Date(1294268679000)}]} Also, please, format your code when you paste it. -- 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-scriptacul...@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 1.7 EvalJSON Error Sintax on Date Eval
Hi I'm working with the evalJSON method many time before but some reason now is sending me a Error Sintax when I try it to use with any Date format. the json string which I'm receiving in the responseJSON is the follow. [{Aspirante_id:37,AspirantesComentarios_id: 6,Comentario:asdfadsf,Who:nahum,When:new Date(1294268679000)}] I'm doing something like [{Aspirante_id: 37,AspirantesComentarios_id: 6,Comentario:asdfadsf,Who:nahum,When:new Date(1294268679000)}].evalJSON(); and I getting Error sintax but If I remove the When Value with the date the evalJSON works without any problem does any know why is this, do I'm doing something wrong, Im working this with Newtosoft and C#. Code C# is a webmethod var commentsFound = from comment in aspirantescomentario.All() where comment.Aspirante_id == Convert.ToInt32(id) orderby comment.When descending select new { comment.Aspirante_id, comment.AspirantesComentarios_id, comment.Comentario, comment.Who, comment.When }; var js = JsonConvert.SerializeObject(commentsFound,new JavaScriptDateTimeConverter()); Context.Response.Output.Write(js); Context.Response.End(); return string.Empty; -- 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-scriptacul...@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: Stack overflow... ???
[off-topic] Hi TJ I just saw in your jsbin code the attribute span data-picker='colors=blue'Blue/span data-picker is a real attribute?? or you just add it for easy use with the $('*[data- picker]') selector?? thanks in advance nahum On Oct 14, 10:35 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Thanks also for the short version of your setSelect()... Glad that helped! ...I tried in vain to do that for a full day... another example of how the prototype documentation really sucks! Okay, granted it's a bit terse:http://api.prototypejs.org/dom/form/element/setvalue/ ...but I wouldn't have said it sucked. Regardless, I know from experience that they're very happy indeed to accept documentation patches to improve things... -- T.J. ;-) On Oct 14, 1:42 pm, Phil Petree phil.pet...@gmail.com wrote: Thanks TJ! I had fixed the Stack Overflow problem around 6a this morning... I would share what the problem was but then I'd have to kill my self! LOL Thanks also for the short version of your setSelect(), I tried in vain to do that for a full day... another example of how the prototype documentation really sucks! It should have been a 2 minute find/do. Not gonna worry about the click handler because there are only 8 onclicks on that page and I doubt a user will use more than 1 or 2 of them... if they even realize those images work that way... just an easter egg is all it is. On Thu, Oct 14, 2010 at 7:33 AM, T.J. Crowder t...@crowdersoftware.comwrote: Hi, I'm not 100% sure what you're trying to do with all of those templates and that selector (the selector is invalid, looks like maybe you're trying to use a template in it, but it's all one big quoted string, so...). However, I _think_ you're trying to replicate the Prototype `Element#setValue` function. If I'm reading right, your `setSelect` could read like this: function setSelect(selID, strValue) { $(selID).setValue(strValue); } Live example:http://jsbin.com/aboyo Perhaps off-topic, but I wouldn't have all of those onclicks if you can avoid it: http://jsbin.com/aboyo/2 You can condense that a bit: http://jsbin.com/aboyo/3 HTH, apologies if I've gotten the wrong end of the stick. -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / com On Oct 14, 1:54 am, Phil Petree phil.pet...@gmail.com wrote: Hey All! In my html doc I have a series of images... one for aol, yahoo, gmail, facebook etc. and each image in written like this: img src='images/aol.png' border='0' onclick='setSelect(thSelect, aol);'/ In my javascript file I have setSelect defined like this: function setSelect(strID, strValue) { var selectIDTemplate = new Template('#{matchID}'); var selectTemplate = new Template('#{matchString}'); var selectThis = {matchID: strID}; var selectID = {matchString: strValue }; $$('select#selectIDTemplate.evaluate(selectID) option').each(function(o){ if(o.value == selectTemplate.evaluate(selectThis)){o.selected = true;$break;} }); } When I click on an image I get a Stack Overflow on line 29 error. This is with prototype.js 1.6.1 Any ideas? Suggestions? Thanks! Pete -- 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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculou s%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. -- 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-scriptacul...@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: Array merge problem
Is not better to use an object inside of the Array. at least is more readable var uri = [ { base : mypathbase/, img : image1.png }, { base : mypathbase/, img : image2.png }] var img = uri[0].base + uri[0].img; // mypathbase/image1.png best On Sep 28, 2:24 pm, Walter Lee Davis wa...@wdstudio.com wrote: Imagine two arrays: [one, two, three, four] [three, four, five, six] And I want to end up with [one, two, three, four, five, six] but I have no guarantee that there aren't some repeated values in there -- I can't just use Prototype's Array#uniq to do this -- because order of elements is important. I need the equivalent of lining up two transparencies on a light table, except with arrays. That's a very simplified model, let me explain what they really represent: The first is the base HREF of the page, and the second is a path to an image file. I need to construct an absolute URI to the image, regardless of whether it was coded as a root-relative or page- relative URL in the HTML. Can anyone suggest a way to do this? Thanks, Walter -- 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-scriptacul...@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: window.open on ajax response
I guess one easy option is to call a outside function like new Ajax.Request('someURL', { onSuccess: function(response) { var success = response.responseText; success == true ? openPopup(http://google.com;) : openPopup(http://yahoo.com;); } }); function openPopup(site){ window.open(site); } mmm but what I don't know is if the browser is going to keep blocking the new window... the only difference with this is the scope. but that should be work... Nahum On Jul 10, 7:49 am, Hari hariharanwebm...@gmail.com wrote: Hi, I have hyperlink. When a user clicks on it, i would make a ajax call to get the location where a new browser window should be opened. for example: new Ajax.Request('someURL', { onSuccess: function(response) { var success = response.responseText; success == true ? window.open(http://google.com;) : window.open(http://yahoo.com;); } }); But problem is the window.open is called as part of onSuccess callback. So the browser popup blocker blocks the call. How can I get around this problem and want the popup to open. Thanks, Hari -- 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-scriptacul...@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: referencing div when class event triggered.
I guess you can do something like: funcToCall(event){ var o = Event.element(event); //and that's the object who was been mouseovered X) } Here is a similar question did it time ago in this list best practice... http://stackoverflow.com/questions/2794885/javascript-prototype-best-practice-event-handlers in the new prototype 1.7 RC are a better way to doing this. best Nahum On Jul 9, 8:50 pm, Matt matthew.jones...@gmail.com wrote: Hello, I am trying to figure out how to reference a specific div after it has been mouseOver, when i have an observe on a class-name that a bunch of div's share. The reason for this i want the code to be expandable where i can have multiple boxes with the same class, sharing all CSS properties, without having to sequentially id each div, and have X amount of observes; one for each specific div. So the basic JS would be something like: $$('.className'),observe('mouseover', funcToCall(way_to_reference_div) ); with a bunch of div's coded in html like: div class=className/div div class=className/div div class=className/div ... i understand if i have to add an id to each specific div, but i want a way to reference the id from a single observe statement that works for all div's sharing that class. Thanks, -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@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 JSON Request with Flickr URL response don't work in Firefox
Hi every body I have a weird issue I been working with the Flickr API, in Flickr for make a connection with the server is through url format in my case something like this http://api.flickr.com/services/rest/?method=flickr.photosets.getListapi_key=10cb3dccaa050efebdc01540c1d4d227user_id=51390...@n07format=json If your run into any browser you are going to get a flickr function and is ok, but Im trying to obtain with Ajax Im doing something like new Ajax.Request('http://api.flickr.com/services/rest/? method=flickr.photosets.getListapi_key=10cb3dccaa050efebdc01540c1d4d227user_id=51390...@n07format=json', { method:'get', onSuccess: function(transport){ debugger; var response = transport.responseText || no response text; alert(Success! \n\n + response); }, onFailure: function(){ alert('Something went wrong...') } }); And is working good in IE the response have what you can see in the url of flickr but in Firefox I dont know why Im getting in the responseText a blank string . does any have any clue what am I doing wrong? Thanks Nahum -- 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-scriptacul...@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 JSON Request with Flickr URL response don't work in Firefox
Yes thanks David, I just had read about this, and found this one for Prototype http://www.dandean.com/jsonp-for-prototypejs/ and the js file is in http://www.dandean.com/jsonp-for-prototypejs/src/jsonp.js this let you make cross domain calls, (at least is what he is saying) Im going to try in a few seconds. Jquery have JSONP include it into there core options, do you know if exist any intent to have it in prototype core'???. this is the example in jquery. $.getJSON('ajax/test.json', function(data) { $('.result').html('p' + data.foo + '/p' + 'p' + data.baz[1] + '/p'); }); thanks long live to prototype =) On Jun 24, 12:53 pm, David Behler d.beh...@gmail.com wrote: Hi Nahum, as far as I know Firefox does not allow for cross-domain AJAX requests. What you could to is to request a php file on your server and that php file does the call to the Flickr API. David Am 24.06.2010 19:47, schrieb ncubica: Hi every body I have a weird issue I been working with the Flickr API, in Flickr for make a connection with the server is through url format in my case something like this http://api.flickr.com/services/rest/?method=flickr.photosets.getList;... If your run into any browser you are going to get a flickr function and is ok, but Im trying to obtain with Ajax Im doing something like new Ajax.Request('http://api.flickr.com/services/rest/? method=flickr.photosets.getListapi_key=10cb3dccaa050efebdc01540c1d4d227us er_id=51390...@n07format=json', { method:'get', onSuccess: function(transport){ debugger; var response = transport.responseText || no response text; alert(Success! \n\n + response); }, onFailure: function(){ alert('Something went wrong...') } }); And is working good in IE the response have what you can see in the url of flickr but in Firefox I dont know why Im getting in the responseText a blank string . does any have any clue what am I doing wrong? Thanks Nahum -- 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-scriptacul...@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 JSON Request with Flickr URL response don't work in Firefox
and the JSONP works at least for flickr... thanks for the support =) On Jun 24, 12:53 pm, David Behler d.beh...@gmail.com wrote: Hi Nahum, as far as I know Firefox does not allow for cross-domain AJAX requests. What you could to is to request a php file on your server and that php file does the call to the Flickr API. David Am 24.06.2010 19:47, schrieb ncubica: Hi every body I have a weird issue I been working with the Flickr API, in Flickr for make a connection with the server is through url format in my case something like this http://api.flickr.com/services/rest/?method=flickr.photosets.getList;... If your run into any browser you are going to get a flickr function and is ok, but Im trying to obtain with Ajax Im doing something like new Ajax.Request('http://api.flickr.com/services/rest/? method=flickr.photosets.getListapi_key=10cb3dccaa050efebdc01540c1d4d227us er_id=51390...@n07format=json', { method:'get', onSuccess: function(transport){ debugger; var response = transport.responseText || no response text; alert(Success! \n\n + response); }, onFailure: function(){ alert('Something went wrong...') } }); And is working good in IE the response have what you can see in the url of flickr but in Firefox I dont know why Im getting in the responseText a blank string . does any have any clue what am I doing wrong? Thanks Nahum -- 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-scriptacul...@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: Javascript Prototype Best Practice Event Handlers
h!!! that was great thank a lot I will improve my code, and yes I was watch each individual li. I will post the answer in http://stackoverflow.com/questions/2794885/javascript-prototype-best-practice-event-handlers thanks T.J. On May 10, 12:45 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, If you really want to watch each individual `li` directly, then what you have seems perfectly straightforward. But in that situation, barring a really good reason to do it that way, I wouldn't use a handler on each `li`; I'd listen for clicks on the elementToUpdate (or the `ul` within it) instead with just a single handler: $(elementToUpdate).observe(click, function(event) { var li; // Find out which `li` was clicked: li = event.findElement(li); if (li) { // Do something with the `li` } }); Prototype 1.7 has a new feature to simplify that a bit: $(elementToUpdate).on(click, li, function(event, li) { // Do something with the `li`; note it's given as the second // argument to the function }); ...where behind the scenes, Prototype is basically doing what I did above. You'll want the first version if you're still using 1.6 (and since 1.7 is still at RC1, I expect you probably are). HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On May 10, 4:09 pm, ncubica ncub...@gmail.com wrote: Hi this question is more a consulting of best practice, Sometimes when I'm building a complete ajax application I usually add elements dynamically for example. When you'r adding a list of items, I do something like: var template = new Template(li id='list#{id}'#{value}/li); var arrayTemplate = []; arrayOfItem.each(function(item, index){ arrayTemplate.push(template.evaluate( id : index, value : item))}); after this I have two options add the list via update or insert - $(elementToUpdate).update(ul + arrayTemplate.join() + / ul); the question is how can I add the event handler without repeat the process of read the array, this is because if you try add a Event before the update or insert you will get an Error because the element isn't still on the DOM. so what I'm doing by now is after insert or update: arrayOfItem.each(function(item, index){ $(list + index).observe(click, function(){ alert(I see the world); })}); so the question is exist a better way to doing this?? -- 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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/prototype-scriptaculous?hl=en. -- 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-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/prototype-scriptaculous?hl=en. -- 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-scriptacul...@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] Javascript Prototype Best Practice Event Handlers
Hi this question is more a consulting of best practice, Sometimes when I'm building a complete ajax application I usually add elements dynamically for example. When you'r adding a list of items, I do something like: var template = new Template(li id='list#{id}'#{value}/li); var arrayTemplate = []; arrayOfItem.each(function(item, index){ arrayTemplate.push(template.evaluate( id : index, value : item)) }); after this I have two options add the list via update or insert - $(elementToUpdate).update(ul + arrayTemplate.join() + / ul); the question is how can I add the event handler without repeat the process of read the array, this is because if you try add a Event before the update or insert you will get an Error because the element isn't still on the DOM. so what I'm doing by now is after insert or update: arrayOfItem.each(function(item, index){ $(list + index).observe(click, function(){ alert(I see the world); }) }); so the question is exist a better way to doing this?? -- 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-scriptacul...@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.