Re: [Proto-Scripty] Re: Using Prototype
My two pennies for what it's worth. I used to use prototype in everything and I loved it for AJAX and DOM manipulation. I have since moved everything I do to jQuery because it serves my purposes more with it's live bindings and garbage collection. I also love jquery's $.fn methods to easilt create functions and classes. I write extensive User Interface applications - one of them being an open source web desktop (which is the reason I ported to jQuery) being that the code was 400 lines rather than 2000+ in prototype (probably my code but never the less!!) jQuery has lovely chaining abilities making manipulation nice and straight forward. Most of the stuff I miss from prototype I hack around or just make do without. I am not in anyway saying one is better than the other for overall general usage - I just find jQuery alot faster to develop with. Alex Mcauley http://www.thevacancymarket.com - Original Message - From: joe t. thooke...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, July 07, 2010 2:31 AM Subject: [Proto-Scripty] Re: Using Prototype Expanding somewhat on T.J.'s point, i definitely couldn't work without Prototype's data management utilities (Enumerable, Object extensions, etc). i love jQuery's compactness and efficiency, but with almost no attention to Javascript data, i'd rather sacrifice it's DOM efficiency to have Prototype's data/object manipulation skills. For lightweight websites that don't require a lot of local data treatment, i'll use jQuery because it's fairly easy to get used to, and compact. For anything where i'm retrieving server data or managing data within the client for an app, i stick to Prototype, and i've rarely had occasion for them to overlap. Just my thoughts. It's not a blog, i know, but since you asked... :) joe t. On Jul 6, 12:39 am, P.J. pjfontil...@gmail.com wrote: Thanks T.J. The Language section is definitely a prime example of an area Prototype excels at where jQuery does little in. My aim is to use both libraries in a manner that complements each other. Just looking for positive reinforcement in that idea; looking for specific strengths each library has. On Jul 5, 2:15 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Just generally speaking, but: If you go to the API reference[1], most things in the Language section fall into the category of things Prototype provides that jQuery doesn't. jQuery has $.each, but most of the other stuff in Prototype's Enumerable isn't in jQuery. I _think_ Prototype 1.7 (currently at RC2) has better support for querying the layout of elements than jQuery does -- for instance, finding out the current pixel value of an auto margin. [1]http://api.prototypejs.org/ FWIW, -- T.J. Crowder Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On Jul 4, 6:24 pm, P.J. pjfontil...@gmail.com wrote: Hi guys, First off, here's a reference I'd like you to read so you'll understand where I'm coming from.http://jqueryvsmootools.com/ It's written by Aaron Newton and it's about jQuery and MooTools. Short and sweet, jQuery focuses on the DOM, and does a pretty good job with it; and MooTools focuses on the entire JavaScript language. Aaron's MooTools is my Prototype. I have a library that uses both jQuery and Prototype. I'm not using Scriptaculous as jQuery can handle most of the UI. I've been using Prototype to parse JSON and retrieve data from external sources, and always consider using it first when I come across something difficult to code. I have both in my library because I wanted to be able to use widgets for both, thus netting me a large variety of widgets and functionality from both camps. Should I be treating Prototype similar to how Aaron views MooTools? As an extension of the entire JavaScript language as a whole? Does anyone have any examples of situations where Prototype provides functionality that jQuery doesn't? Mainly, anything outside the UI. jQuery also supports JSON usage, but by using Prototype I can not only parse JSON but XML and other arbitrary data types as well. I wish to re-evaluate my decision to use both in one library, especially if one of my reasons was the usage of plugins from both camps and the other was that Prototype and jQuery serve different purposes. Please help me out, I always attempt to contribute my findings back to the community and would greatly appreciate 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. -- You received this message because you are subscribed
[Proto-Scripty] Re: Using Prototype
Expanding somewhat on T.J.'s point, i definitely couldn't work without Prototype's data management utilities (Enumerable, Object extensions, etc). i love jQuery's compactness and efficiency, but with almost no attention to Javascript data, i'd rather sacrifice it's DOM efficiency to have Prototype's data/object manipulation skills. For lightweight websites that don't require a lot of local data treatment, i'll use jQuery because it's fairly easy to get used to, and compact. For anything where i'm retrieving server data or managing data within the client for an app, i stick to Prototype, and i've rarely had occasion for them to overlap. Just my thoughts. It's not a blog, i know, but since you asked... :) joe t. On Jul 6, 12:39 am, P.J. pjfontil...@gmail.com wrote: Thanks T.J. The Language section is definitely a prime example of an area Prototype excels at where jQuery does little in. My aim is to use both libraries in a manner that complements each other. Just looking for positive reinforcement in that idea; looking for specific strengths each library has. On Jul 5, 2:15 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Just generally speaking, but: If you go to the API reference[1], most things in the Language section fall into the category of things Prototype provides that jQuery doesn't. jQuery has $.each, but most of the other stuff in Prototype's Enumerable isn't in jQuery. I _think_ Prototype 1.7 (currently at RC2) has better support for querying the layout of elements than jQuery does -- for instance, finding out the current pixel value of an auto margin. [1]http://api.prototypejs.org/ FWIW, -- T.J. Crowder Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On Jul 4, 6:24 pm, P.J. pjfontil...@gmail.com wrote: Hi guys, First off, here's a reference I'd like you to read so you'll understand where I'm coming from.http://jqueryvsmootools.com/ It's written by Aaron Newton and it's about jQuery and MooTools. Short and sweet, jQuery focuses on the DOM, and does a pretty good job with it; and MooTools focuses on the entire JavaScript language. Aaron's MooTools is my Prototype. I have a library that uses both jQuery and Prototype. I'm not using Scriptaculous as jQuery can handle most of the UI. I've been using Prototype to parse JSON and retrieve data from external sources, and always consider using it first when I come across something difficult to code. I have both in my library because I wanted to be able to use widgets for both, thus netting me a large variety of widgets and functionality from both camps. Should I be treating Prototype similar to how Aaron views MooTools? As an extension of the entire JavaScript language as a whole? Does anyone have any examples of situations where Prototype provides functionality that jQuery doesn't? Mainly, anything outside the UI. jQuery also supports JSON usage, but by using Prototype I can not only parse JSON but XML and other arbitrary data types as well. I wish to re-evaluate my decision to use both in one library, especially if one of my reasons was the usage of plugins from both camps and the other was that Prototype and jQuery serve different purposes. Please help me out, I always attempt to contribute my findings back to the community and would greatly appreciate 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] Re: Using Prototype
Hi, Just generally speaking, but: If you go to the API reference[1], most things in the Language section fall into the category of things Prototype provides that jQuery doesn't. jQuery has $.each, but most of the other stuff in Prototype's Enumerable isn't in jQuery. I _think_ Prototype 1.7 (currently at RC2) has better support for querying the layout of elements than jQuery does -- for instance, finding out the current pixel value of an auto margin. [1] http://api.prototypejs.org/ FWIW, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Jul 4, 6:24 pm, P.J. pjfontil...@gmail.com wrote: Hi guys, First off, here's a reference I'd like you to read so you'll understand where I'm coming from.http://jqueryvsmootools.com/ It's written by Aaron Newton and it's about jQuery and MooTools. Short and sweet, jQuery focuses on the DOM, and does a pretty good job with it; and MooTools focuses on the entire JavaScript language. Aaron's MooTools is my Prototype. I have a library that uses both jQuery and Prototype. I'm not using Scriptaculous as jQuery can handle most of the UI. I've been using Prototype to parse JSON and retrieve data from external sources, and always consider using it first when I come across something difficult to code. I have both in my library because I wanted to be able to use widgets for both, thus netting me a large variety of widgets and functionality from both camps. Should I be treating Prototype similar to how Aaron views MooTools? As an extension of the entire JavaScript language as a whole? Does anyone have any examples of situations where Prototype provides functionality that jQuery doesn't? Mainly, anything outside the UI. jQuery also supports JSON usage, but by using Prototype I can not only parse JSON but XML and other arbitrary data types as well. I wish to re-evaluate my decision to use both in one library, especially if one of my reasons was the usage of plugins from both camps and the other was that Prototype and jQuery serve different purposes. Please help me out, I always attempt to contribute my findings back to the community and would greatly appreciate 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] Re: Using Prototype
Thanks T.J. The Language section is definitely a prime example of an area Prototype excels at where jQuery does little in. My aim is to use both libraries in a manner that complements each other. Just looking for positive reinforcement in that idea; looking for specific strengths each library has. On Jul 5, 2:15 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Just generally speaking, but: If you go to the API reference[1], most things in the Language section fall into the category of things Prototype provides that jQuery doesn't. jQuery has $.each, but most of the other stuff in Prototype's Enumerable isn't in jQuery. I _think_ Prototype 1.7 (currently at RC2) has better support for querying the layout of elements than jQuery does -- for instance, finding out the current pixel value of an auto margin. [1]http://api.prototypejs.org/ FWIW, -- T.J. Crowder Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On Jul 4, 6:24 pm, P.J. pjfontil...@gmail.com wrote: Hi guys, First off, here's a reference I'd like you to read so you'll understand where I'm coming from.http://jqueryvsmootools.com/ It's written by Aaron Newton and it's about jQuery and MooTools. Short and sweet, jQuery focuses on the DOM, and does a pretty good job with it; and MooTools focuses on the entire JavaScript language. Aaron's MooTools is my Prototype. I have a library that uses both jQuery and Prototype. I'm not using Scriptaculous as jQuery can handle most of the UI. I've been using Prototype to parse JSON and retrieve data from external sources, and always consider using it first when I come across something difficult to code. I have both in my library because I wanted to be able to use widgets for both, thus netting me a large variety of widgets and functionality from both camps. Should I be treating Prototype similar to how Aaron views MooTools? As an extension of the entire JavaScript language as a whole? Does anyone have any examples of situations where Prototype provides functionality that jQuery doesn't? Mainly, anything outside the UI. jQuery also supports JSON usage, but by using Prototype I can not only parse JSON but XML and other arbitrary data types as well. I wish to re-evaluate my decision to use both in one library, especially if one of my reasons was the usage of plugins from both camps and the other was that Prototype and jQuery serve different purposes. Please help me out, I always attempt to contribute my findings back to the community and would greatly appreciate 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] Re: using prototype tabs within a prototype horizontal accordion
Use firebug... it states the error as Element Does not exist ...so i would say reverse the load order for the 2 classes and it should be ok change your code to somehting like the following Event.observe(window, 'load', function() { var tabs = new tabset('container'); // name of div to crawl for tabs and panels tabs.autoActivate($('tab_first')); // name of tab to auto-select if none exists in the url var topAccordion = new accordion('horizontal_container', { classNames : { toggle : 'horizontal_accordion_toggle', toggleActive : 'horizontal_accordion_toggle_active', content : 'horizontal_accordion_content' }, defaultSize : { width : 400 }, direction : 'horizontal' }); var bottomAccordion = new accordion('vertical_container'); var nestedVerticalAccordion = new accordion('vertical_nested_container', { classNames : { toggle : 'vertical_accordion_toggle', toggleActive : 'vertical_accordion_toggle_active', content : 'vertical_accordion_content' } }); // Open first one bottomAccordion.activate($$('#vertical_container .accordion_toggle')[0]); // Open second one topAccordion.activate($$('#horizontal_container .horizontal_accordion_toggle')[2]); }); // end event listener/script - Original Message - From: jwtdesign irishwhis...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Saturday, May 02, 2009 8:01 PM Subject: [Proto-Scripty] using prototype tabs within a prototype horizontal accordion Hello, I am trying to build a website that uses the horizontal accordion framework downloaded from http://www.stickmanlabs.com/accordion/ and then within the panel content, I am trying to use a tab set-up. However, the two prototype libraries seem to be conflicting. If I get rid of one, the tabs will work but the accordion is broken. If I get rid of the other, the accordion will work but the tabs will not. I'd really appreciate any help! Here is the link with the tabs working in the first panel. But as you can see, the accordion is broken: http://www.jwtdesign.com/clients/tsnav/ts_index_test.html Please help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: using prototype tabs within a prototype horizontal accordion
Thanks so much for the reply! but unfortunately, that error has been there since the beginning. So, my thoughts are that the error is not affecting the functionality (or non-functionality) of the accordion. Is there any way to combine both prototype scripts into one or strip out what I don't need? I'm so sorry to ask these questionsthis is just all a little new to me. Thanks for all your help thus far! On Sun, May 3, 2009 at 4:11 AM, Alex McAuley webmas...@thecarmarketplace.com wrote: Use firebug... it states the error as Element Does not exist ...so i would say reverse the load order for the 2 classes and it should be ok change your code to somehting like the following Event.observe(window, 'load', function() { var tabs = new tabset('container'); // name of div to crawl for tabs and panels tabs.autoActivate($('tab_first')); // name of tab to auto-select if none exists in the url var topAccordion = new accordion('horizontal_container', { classNames : { toggle : 'horizontal_accordion_toggle', toggleActive : 'horizontal_accordion_toggle_active', content : 'horizontal_accordion_content' }, defaultSize : { width : 400 }, direction : 'horizontal' }); var bottomAccordion = new accordion('vertical_container'); var nestedVerticalAccordion = new accordion('vertical_nested_container', { classNames : { toggle : 'vertical_accordion_toggle', toggleActive : 'vertical_accordion_toggle_active', content : 'vertical_accordion_content' } }); // Open first one bottomAccordion.activate($$('#vertical_container .accordion_toggle')[0]); // Open second one topAccordion.activate($$('#horizontal_container .horizontal_accordion_toggle')[2]); }); // end event listener/script - Original Message - From: jwtdesign irishwhis...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Saturday, May 02, 2009 8:01 PM Subject: [Proto-Scripty] using prototype tabs within a prototype horizontal accordion Hello, I am trying to build a website that uses the horizontal accordion framework downloaded from http://www.stickmanlabs.com/accordion/ and then within the panel content, I am trying to use a tab set-up. However, the two prototype libraries seem to be conflicting. If I get rid of one, the tabs will work but the accordion is broken. If I get rid of the other, the accordion will work but the tabs will not. I'd really appreciate any help! Here is the link with the tabs working in the first panel. But as you can see, the accordion is broken: http://www.jwtdesign.com/clients/tsnav/ts_index_test.html Please help! -- Irishwhiskey is Jeffrey Talley “As a cure for worrying, work is better than whiskey.” —Ralph Waldo Emerson --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Using Prototype functions on load: Difficulties with IE
Hi, Sounds like you're new to Prototype - welcome! When working with Prototype DOM extensions, you have to use $() to get the element unless you got it from a Prototype method (in which case, Prototype has already done it for you). Here's why: http://prototypejs.org/learn/extensions So just change document.body.update('Foo'); to $(document.body).update('Foo'); (But do read the link, so you know why.) HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 20, 10:51 am, lacco schlichting@googlemail.com wrote: Hi! I just tried to use prototype for writing Foo into document's body (in fact, I just broke down a little more complex code into this). But the IE doesn't find the document.body.update function (in Firefox, all works perfect): html head script src=/javascripts/prototype-1.6.0.3.js type=text/ javascript/script script type=text/javascript Event.observe(window, 'load', function(){ document.body.update('Foo'); }); /script /head body/body /html Am I using the correct DOM event on IE, or which other mistake is in my code? Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Using Prototype from within an iframe
On Nov 6, 2008, at 3:57 PM, Walter Lee Davis wrote: [snip] The filesList reference works, and I know that the element is being extended, because the remove() part works correctly. But no matter what I try to insert into filesList later (I even tried with a simple lihowdy/li to see if multiple rows at a time was the issue) no insertion happens. Does anyone have any idea what might be happening here? Thanks in advance, Well, I worked around the problem, probably a better way to go anyway. I made a new partial that could generate the entire list in one whack, and used Ajax.Updater to call it. I defined a function in the parent page called updateList(storyId) that wrapped A.U, and then called it from the iframe thusly: top.window.updateList(?=$id?); So now it works everywhere. I'd still like to know if there's any red hot reason why I couldn't do what I was trying under IE6. If anyone has any ideas, please let me know. 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-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Using Prototype/Scriptaculous in a popup window
In the parent page/window you could have an invisible div then use ajax.request to update the div with desired data and seem to popup by setting visibility=true On 9/20/08, Bobby.D [EMAIL PROTECTED] wrote: Ok, I was just checking about the popup, I thought perhaps using the function to open would screw stuff up. I am designing an Intranet Business Web App, restricted to 1 browser. If I was going to use a lightbox effect I'd just open a whole new page, but I'm trying to give the app a slightly more desktop feel. On Sep 20, 1:49 pm, bluezehn [EMAIL PROTECTED] wrote: Can I please, please beg of you not to use a popup window. It's ugly. Most browsers just block them anyway so it's useless. You've got to remember as well that a popup window is a COMPLETELY separate browser instance. You can't access any variables at all from the source window, and prototype/scriptaculous will not be available unless they're included in the source of the popup. Much much better is to bring up a fixed positioned div floated above everything else on the page. Google prototip to see what I mean - and they don't have to be tooltips either, they can be full on windows over the rest of your page - see the other project by the author of prototip, think it's called lightbox, to see what I mean. Other than that advice, your question is way too vague to be able to answer it. If you have prototype in the source of the popup window, ajax will be available just as it otherwise would be - either you haven't included prototype or there's an error in your code, in which case the fact that it's running in a popup window is completely irrelevant. On Sep 20, 5:46 pm, Bobby.D [EMAIL PROTECTED] wrote: I'm using the following function to generate a pop up box: var win=null; function popUp(page, name, w, h, scrollb) { var winL = (screen.width-w)/2; var winT = (screen.height-h)/3.5; var settings = 'height='+h+','; settings += 'width='+w+','; settings += 'top='+winT+','; settings += 'left='+winL+','; settings += 'resizable=no'; settings += 'scrollbars='+scrollb+','; settings += 'toolbar=no'; settings += 'menubar=no'; window.open(page, name, settings); } I use the following link to open: a href=# onclick=popUp('initiate.php', 'Initiate Case', '600', '600', 'no')img src=images/initiateCase.png alt=Initiate Case / /a The popup works, however, I can't get ANY AJAX to work on the pop up. I'm successfully loading several Spry Assets, I can't figure out why I can' get any of the AJAX to work. I'm using an Updater to display a dynamically generated number from a PHP page. When I pull the php page up, it is working properlybut no update. Could it be because of the way I'm opening the page? -- Sent from Gmail for mobile | mobile.google.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---