[Proto-Scripty] Re: News Items List
Sorry just to clarify: Line 3 Char3 is the first line of your function. So it's the line starting with: document.observer(. On Mar 15, 10:04 am, PartisanEntity partisanent...@gmail.com wrote: The link is currently behind a firewall so I can't post it. But here is what IE says: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/ 4.0; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8) Timestamp: Tue, 15 Mar 2011 09:01:36 UTC Message: Object doesn't support this property or method Line: 3 Char: 3 Code: 0 URI:http://www.test.com/_includes/newseffect/slideeffect.js On Mar 14, 5:46 pm, Walter Lee Davis wa...@wdstudio.com wrote: And you also loaded Prototype and Scriptaculous before that, in that order, right? Can you post a link? I have IE8 with a debugger enabled here on a VM, I could see if any errors suggest themselves. Walter On Mar 14, 2011, at 12:20 PM, PartisanEntity wrote: The list is displayed in its entirety without animations. It's almost as if the JavaScript it being ignored completely in IE8. I pasted your JavaScript into a file which I called newslist.js. I linked to it in the head section of my html file like so: script type=text/javascript src=http://www.test.com/_includes/ newsbox/newslist.js/script On Mar 14, 3:43 pm, Walter Lee Davis wa...@wdstudio.com wrote: No, but please define doesn't work. Does the animation fail, does the text not change...? Walter On Mar 14, 2011, at 8:34 AM, PartisanEntity wrote: Hi Walter, Thanks so much for this. It is working perfectly. There is only one issue I am having: While it works in Firefox and Safari, I tried using IE8 and noticed that it works on one computer, but not on another. Do you have any experiences with this script and IE8, anything to watch out for? Thanks! On Mar 12, 5:02 pm, Walter Lee Davis wa...@wdstudio.com wrote: Here's a cut-down version of the code generated by my NewsCycle plug- in for Softpress Freeway. document.observe('dom:loaded',function(){ var newsSource = $('yourListId'); var delayBetweenItems = 3; var effectSpeed = 0.6; var tag = newsSource.firstDescendant().tagName.toLowerCase(); var data = newsSource.select(tag).invoke('hide').pluck('innerHTML'); var news = newsSource.down(tag).show(); var index = 0; var newsCycle = function(){ index = (++index = data.length ? 0 : index) new Effect.Fade(news,{ delay:delayBetweenItems, duration:effectSpeed, afterFinish:function(){ new Effect.BlindDown(news,{ duration:effectSpeed, beforeStart:function(){ news.update(data[index]); }, afterFinish:newsCycle }); } }); }; newsCycle(); }); You need prototype and scriptaculous effects in the page first, obviously, and you need to fill in the id of your list. My plug-in has extra code to make it list agnostic, so you could simplify this a lot if you knew that your effect was only ever being applied to a list. You could also use this as written on a DIV with a bunch of P tags in it, or a DIV with a bunch of DIVs in it -- there's no end to the possible combinations. Walter On Mar 11, 2011, at 11:35 AM, PartisanEntity wrote: Hi all, I am relatively new to scriptaculous and would like to know if the following is possible. I would like to create a list of news items on my website. Instead of showing all items in my ul list, I would like for each item to appear using the slide down effect, then for it to disappear and for the next item to appear by sliding down. Is this possible? Has this been done before, perhaps there is some code I could copy as I have no idea how to build something like this. Thank you very much for you time and effort. -- 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 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
Re: [Proto-Scripty] Re: News Items List
You might wanna try document.observe(); instead of document.observer(); David Am 15.03.2011 10:34, schrieb PartisanEntity: Sorry just to clarify: Line 3 Char3 is the first line of your function. So it's the line starting with: document.observer(. On Mar 15, 10:04 am, PartisanEntitypartisanent...@gmail.com wrote: The link is currently behind a firewall so I can't post it. But here is what IE says: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/ 4.0; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8) Timestamp: Tue, 15 Mar 2011 09:01:36 UTC Message: Object doesn't support this property or method Line: 3 Char: 3 Code: 0 URI:http://www.test.com/_includes/newseffect/slideeffect.js On Mar 14, 5:46 pm, Walter Lee Daviswa...@wdstudio.com wrote: And you also loaded Prototype and Scriptaculous before that, in that order, right? Can you post a link? I have IE8 with a debugger enabled here on a VM, I could see if any errors suggest themselves. Walter On Mar 14, 2011, at 12:20 PM, PartisanEntity wrote: The list is displayed in its entirety without animations. It's almost as if the JavaScript it being ignored completely in IE8. I pasted your JavaScript into a file which I called newslist.js. I linked to it in the head section of my html file like so: script type=text/javascript src=http://www.test.com/_includes/ newsbox/newslist.js/script On Mar 14, 3:43 pm, Walter Lee Daviswa...@wdstudio.com wrote: No, but please define doesn't work. Does the animation fail, does the text not change...? Walter On Mar 14, 2011, at 8:34 AM, PartisanEntity wrote: Hi Walter, Thanks so much for this. It is working perfectly. There is only one issue I am having: While it works in Firefox and Safari, I tried using IE8 and noticed that it works on one computer, but not on another. Do you have any experiences with this script and IE8, anything to watch out for? Thanks! On Mar 12, 5:02 pm, Walter Lee Daviswa...@wdstudio.com wrote: Here's a cut-down version of the code generated by my NewsCycle plug- in for Softpress Freeway. document.observe('dom:loaded',function(){ var newsSource = $('yourListId'); var delayBetweenItems = 3; var effectSpeed = 0.6; var tag = newsSource.firstDescendant().tagName.toLowerCase(); var data = newsSource.select(tag).invoke('hide').pluck('innerHTML'); var news = newsSource.down(tag).show(); var index = 0; var newsCycle = function(){ index = (++index= data.length ? 0 : index) new Effect.Fade(news,{ delay:delayBetweenItems, duration:effectSpeed, afterFinish:function(){ new Effect.BlindDown(news,{ duration:effectSpeed, beforeStart:function(){ news.update(data[index]); }, afterFinish:newsCycle }); } }); }; newsCycle(); }); You need prototype and scriptaculous effects in the page first, obviously, and you need to fill in the id of your list. My plug-in has extra code to make it list agnostic, so you could simplify this a lot if you knew that your effect was only ever being applied to a list. You could also use this as written on a DIV with a bunch of P tags in it, or a DIV with a bunch of DIVs in it -- there's no end to the possible combinations. Walter On Mar 11, 2011, at 11:35 AM, PartisanEntity wrote: Hi all, I am relatively new to scriptaculous and would like to know if the following is possible. I would like to create a list of news items on my website. Instead of showing all items in myul list, I would like for each item to appear using the slide down effect, then for it to disappear and for the next item to appear by sliding down. Is this possible? Has this been done before, perhaps there is some code I could copy as I have no idea how to build something like this. Thank you very much for you time and effort. -- 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 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-scriptaculous@googlegroups.com . To unsubscribe from this group, send email to
[Proto-Scripty] Re: News Items List
Sorry that was just a typo from me. It is document.observe... On Mar 15, 10:49 am, David Behler d.beh...@gmail.com wrote: You might wanna try document.observe(); instead of document.observer(); David Am 15.03.2011 10:34, schrieb PartisanEntity: Sorry just to clarify: Line 3 Char3 is the first line of your function. So it's the line starting with: document.observer(. On Mar 15, 10:04 am, PartisanEntitypartisanent...@gmail.com wrote: The link is currently behind a firewall so I can't post it. But here is what IE says: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/ 4.0; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8) Timestamp: Tue, 15 Mar 2011 09:01:36 UTC Message: Object doesn't support this property or method Line: 3 Char: 3 Code: 0 URI:http://www.test.com/_includes/newseffect/slideeffect.js On Mar 14, 5:46 pm, Walter Lee Daviswa...@wdstudio.com wrote: And you also loaded Prototype and Scriptaculous before that, in that order, right? Can you post a link? I have IE8 with a debugger enabled here on a VM, I could see if any errors suggest themselves. Walter On Mar 14, 2011, at 12:20 PM, PartisanEntity wrote: The list is displayed in its entirety without animations. It's almost as if the JavaScript it being ignored completely in IE8. I pasted your JavaScript into a file which I called newslist.js. I linked to it in the head section of my html file like so: script type=text/javascript src=http://www.test.com/_includes/ newsbox/newslist.js/script On Mar 14, 3:43 pm, Walter Lee Daviswa...@wdstudio.com wrote: No, but please define doesn't work. Does the animation fail, does the text not change...? Walter On Mar 14, 2011, at 8:34 AM, PartisanEntity wrote: Hi Walter, Thanks so much for this. It is working perfectly. There is only one issue I am having: While it works in Firefox and Safari, I tried using IE8 and noticed that it works on one computer, but not on another. Do you have any experiences with this script and IE8, anything to watch out for? Thanks! On Mar 12, 5:02 pm, Walter Lee Daviswa...@wdstudio.com wrote: Here's a cut-down version of the code generated by my NewsCycle plug- in for Softpress Freeway. document.observe('dom:loaded',function(){ var newsSource = $('yourListId'); var delayBetweenItems = 3; var effectSpeed = 0.6; var tag = newsSource.firstDescendant().tagName.toLowerCase(); var data = newsSource.select(tag).invoke('hide').pluck('innerHTML'); var news = newsSource.down(tag).show(); var index = 0; var newsCycle = function(){ index = (++index= data.length ? 0 : index) new Effect.Fade(news,{ delay:delayBetweenItems, duration:effectSpeed, afterFinish:function(){ new Effect.BlindDown(news,{ duration:effectSpeed, beforeStart:function(){ news.update(data[index]); }, afterFinish:newsCycle }); } }); }; newsCycle(); }); You need prototype and scriptaculous effects in the page first, obviously, and you need to fill in the id of your list. My plug-in has extra code to make it list agnostic, so you could simplify this a lot if you knew that your effect was only ever being applied to a list. You could also use this as written on a DIV with a bunch of P tags in it, or a DIV with a bunch of DIVs in it -- there's no end to the possible combinations. Walter On Mar 11, 2011, at 11:35 AM, PartisanEntity wrote: Hi all, I am relatively new to scriptaculous and would like to know if the following is possible. I would like to create a list of news items on my website. Instead of showing all items in myul list, I would like for each item to appear using the slide down effect, then for it to disappear and for the next item to appear by sliding down. Is this possible? Has this been done before, perhaps there is some code I could copy as I have no idea how to build something like this. Thank you very much for you time and effort. -- 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
[Proto-Scripty] Redrawing Autocomplete Field
I have a weird bug that I'm having trouble debugging. I am using Rails but I think the issue is in the javascript handling somewhere. I have a div with a form and autocomplete div id=form form info autocomplete box /form /div I have the options set so that when the user clicks in the auto- complete they get an initial list (minChars = 0) When the user types a user name in the autocomplete and selects one of the drop down options I generate a request via Ajax and render the form again without the autocomplete. The user can then click 'remove' to remove the user info and re-draw the autocomplete box. After the re-draw the minChars = 0 doesn't work. Whenever I click in the box I see a request generated to my controller, and I return the correct information but it doesn't get rendered into HTML and I dont see a drop down. If the user types a letter or name then the dropdown lits does show up, but the initial ajax request never gets reflected. I assume there is some state variable that thinks the text box hasn't changed value or something which is preventing actually rendering the HTML returned by Rails. I hope that makes sense. Any ideas? P.S. My current workaround is to just hide the autocomplete field and not render it empty. This works but won't be usable in other parts of my site. -- 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: Rails 3.1 - Prototype = WTF?
I agree and would like to see Prototype start returning to the forefront as the powerful JS library it is On Mar 14, 10:53 am, Walter Lee Davis wa...@wdstudio.com wrote: Sorry for the rant, but I came to Prototype by way of early exploration with Rails. I found Prototype approachable and learn-able in a way that I didn't (and don't) find jQuery to be. I've invested years in learning Prototype and it has trained and patterned my JavaScript brain. I'm quite cheesed about the notion of having to learn another way to look at JavaScript. At the same time, I can't help but notice the crickets around here lately. When I joined this list (back in the rails-spinoff days) there were dozens of posts per day, now we're lucky to get there in a week. What the heck is going on here? 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: News Items List
You guys are going to kill me. I cleared the browser cache, and it's working in IE8 too, I'm so sorry for wasting your time :) On Mar 15, 11:02 am, PartisanEntity partisanent...@gmail.com wrote: Sorry that was just a typo from me. It is document.observe... On Mar 15, 10:49 am, David Behler d.beh...@gmail.com wrote: You might wanna try document.observe(); instead of document.observer(); David Am 15.03.2011 10:34, schrieb PartisanEntity: Sorry just to clarify: Line 3 Char3 is the first line of your function. So it's the line starting with: document.observer(. On Mar 15, 10:04 am, PartisanEntitypartisanent...@gmail.com wrote: The link is currently behind a firewall so I can't post it. But here is what IE says: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/ 4.0; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8) Timestamp: Tue, 15 Mar 2011 09:01:36 UTC Message: Object doesn't support this property or method Line: 3 Char: 3 Code: 0 URI:http://www.test.com/_includes/newseffect/slideeffect.js On Mar 14, 5:46 pm, Walter Lee Daviswa...@wdstudio.com wrote: And you also loaded Prototype and Scriptaculous before that, in that order, right? Can you post a link? I have IE8 with a debugger enabled here on a VM, I could see if any errors suggest themselves. Walter On Mar 14, 2011, at 12:20 PM, PartisanEntity wrote: The list is displayed in its entirety without animations. It's almost as if the JavaScript it being ignored completely in IE8. I pasted your JavaScript into a file which I called newslist.js. I linked to it in the head section of my html file like so: script type=text/javascript src=http://www.test.com/_includes/ newsbox/newslist.js/script On Mar 14, 3:43 pm, Walter Lee Daviswa...@wdstudio.com wrote: No, but please define doesn't work. Does the animation fail, does the text not change...? Walter On Mar 14, 2011, at 8:34 AM, PartisanEntity wrote: Hi Walter, Thanks so much for this. It is working perfectly. There is only one issue I am having: While it works in Firefox and Safari, I tried using IE8 and noticed that it works on one computer, but not on another. Do you have any experiences with this script and IE8, anything to watch out for? Thanks! On Mar 12, 5:02 pm, Walter Lee Daviswa...@wdstudio.com wrote: Here's a cut-down version of the code generated by my NewsCycle plug- in for Softpress Freeway. document.observe('dom:loaded',function(){ var newsSource = $('yourListId'); var delayBetweenItems = 3; var effectSpeed = 0.6; var tag = newsSource.firstDescendant().tagName.toLowerCase(); var data = newsSource.select(tag).invoke('hide').pluck('innerHTML'); var news = newsSource.down(tag).show(); var index = 0; var newsCycle = function(){ index = (++index= data.length ? 0 : index) new Effect.Fade(news,{ delay:delayBetweenItems, duration:effectSpeed, afterFinish:function(){ new Effect.BlindDown(news,{ duration:effectSpeed, beforeStart:function(){ news.update(data[index]); }, afterFinish:newsCycle }); } }); }; newsCycle(); }); You need prototype and scriptaculous effects in the page first, obviously, and you need to fill in the id of your list. My plug-in has extra code to make it list agnostic, so you could simplify this a lot if you knew that your effect was only ever being applied to a list. You could also use this as written on a DIV with a bunch of P tags in it, or a DIV with a bunch of DIVs in it -- there's no end to the possible combinations. Walter On Mar 11, 2011, at 11:35 AM, PartisanEntity wrote: Hi all, I am relatively new to scriptaculous and would like to know if the following is possible. I would like to create a list of news items on my website. Instead of showing all items in myul list, I would like for each item to appear using the slide down effect, then for it to disappear and for the next item to appear by sliding down. Is this possible? Has this been done before, perhaps there is some code I could copy as I have no idea how to build something like this. Thank you very much for you time and effort. -- You received this message because you
[Proto-Scripty] Re: Rails 3.1 - Prototype = WTF?
I don't often post here, but I've been using Prototype extensively for the last 6 months. Not a day goes by when I don't say something to myself along the lines of Thank God for Prototype. Perhaps, had I started with J-Query, I'd have said the same thing about it - but I didn't, and I'd like to continue with Prototype. It could very well be the Prototype developers are: bored, busy, broke, out of ideas, or any combination. Maybe instead of just saying things like we'd like Prototype to be more popular and do more things in less space, and be more relevant, etc, someone should create a wish- list page, with a prominent 'Donate Here' button. I don't work for free and don't expect others to either. (I just checked and Prototype's web page does not have a donate button). Programmers all like a challenge, so if we as users can come up with concrete wishes for Prototype then perhaps the developers will take up the challenge. And, Thank God for Prototype! On Mar 14, 10:34 pm, Jason jwestbr...@gmail.com wrote: I agree and would like to see Prototype start returning to the forefront as the powerful JS library it is -- 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: Redrawing Autocomplete Field
Ok, I've done some more debug. The autocomplete text box works still. But it doesn't seem to work with 0 chars. I can see when the user clicks in the text box a request is generated, and a response is generated. I can use the chrome debugger to see that the response is as expected. The AJAX request seems to just not render the HTML when the number of chars is 0, even though it does all the work to generate a request and parse the response. As soon as I type a character I get the expected auto-complete results displayed. When I backspace back to 0 chars it doesn't display anything, but it still does the AJAX request. There must be a place in prototype.js where there is a decision to render the html or not? I can't seem to find it. So I'm just looking for some hints on why that wouldn't happen sometimes.. On Mar 14, 11:27 am, pipplo joe.kos...@gmail.com wrote: I have a weird bug that I'm having trouble debugging. I am using Rails but I think the issue is in the javascript handling somewhere. I have a div with a form and autocomplete div id=form form info autocomplete box /form /div I have the options set so that when the user clicks in the auto- complete they get an initial list (minChars = 0) When the user types a user name in the autocomplete and selects one of the drop down options I generate a request via Ajax and render the form again without the autocomplete. The user can then click 'remove' to remove the user info and re-draw the autocomplete box. After the re-draw the minChars = 0 doesn't work. Whenever I click in the box I see a request generated to my controller, and I return the correct information but it doesn't get rendered into HTML and I dont see a drop down. If the user types a letter or name then the dropdown lits does show up, but the initial ajax request never gets reflected. I assume there is some state variable that thinks the text box hasn't changed value or something which is preventing actually rendering the HTML returned by Rails. I hope that makes sense. Any ideas? P.S. My current workaround is to just hide the autocomplete field and not render it empty. This works but won't be usable in other parts of my site. -- 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: Rails 3.1 - Prototype = WTF?
How did i manage to edit the topic subject? Wasn't intentional, since this is OT from the user assistance intent... Odd. -jt On Mar 14, 9:46 pm, joe t. thooke...@gmail.com wrote: Another anecdote along with Jane's... i make a lot of comparisons to jQuery as well because it's the only other library i've gotten familiar with. i still really like Prototype's robust set of utility data storage functions. i get wary of storing data directly on elements [jQuery.data()] and sometimes it's simply not appropriate to do so, so having Prototype's pseudo-class structure to drive the overall functionality of a page is very helpful, because i can create class members and manage data there, rather than in the HTML area of the DOM. Classes really helped me build complex JS applications when i was still brand new to application-style Javascript AJAX. That said, Prototype is bloated, and doesn't play nice with others. Scriptaculous is old, just as bloated, and i think 1 or 2 lines of code have been updated in the last year, to provide Pt 1.7 compatibility. Plus Scriptaculous doesn't provide an actual UI, just some enhanced visual effects other tools. And you have to be careful of a lot of gotchas in those effects because Scriptaculous doesn't wrap your code into HTML object references that it will need to make those effects work. jQuery's UI does that. One of the bigger advantages of Scriptaculous is Builder. i much prefer creating HTML through a node/tree structure than slapping an HTML string into an element. However, someone went and built a jQuery plugin to do what Builder does. /shrug i've noted elsewhere in this group that i don't like that there are several aliases for many of Prototype's functions, most of which are unnecessary Rails translations for otherwise sensible names. i get that it's supposed to help Rails devs use Prototype efficiently, so why not just keep only the Rails versions of functions and drop the aliases? jQuery tends to provide one way to do a lot of things. Prototype tends to provide a lot of ways to do one thing. i didn't like jQuery at first for all the reasons i stated above for liking Prototype. Once i got the hang of the major differences slight syntax variations, i've found it to really save time in a lot of ways. Granted, i also haven't built any huge application-level code using jQuery yet, but i feel like i could now that i understand the inner workings better. Jane mentioned event handling. i can go either way with that. Prototype's Function#bind makes it easy to incorporate the Class object into an event handler, but you lose context of the element unless you use Event#findElement. And i really like Event#on, but haven't done any heavy lifting with Prototype since 1.7 was released. So jQuery's handlers work fine for me. i've also never developed with Rails, and maybe because of that i don't feel a particular loyalty. i want the right tool for the job at hand, and lately that has been jQuery. Especially the ease of using plugins for missing functionality, and the UI library which amazes me. But to address your actual question: Why has traffic died down in this group? My personal observation would be that jQuery has simply gained traction over the last couple years. Prototype... i don't know. Kinda feels stale, neglected, and maybe a bit stuck in its ways? It seems like there's a lot of push to make JS libraries cooperate with each other so you can get the best each has to offer, yet Prototype can't get itself away from modifying native objects, which forces everyone else to provide safety schemes to accommodate. Also, where most libraries provide compression-safe code, Prototype stays pretty rotund at ~160K. Add Scriptaculous and you can hit 1MB of library before you get to any of your own code. In spite of criticisms, i don't want this to feel like a slam against Prototype. Obviously i still get something out of it or i'd drop my subscription to the groups. But you ask why the traffic has slowed to a crawl, and that's my opinion: Prototype itself has also slowed down. Check the dev group if you don't believe me (http://groups.google.com/ group/prototype-core/topics?hl=engvc=2). Two legitimate threads with posts in 2011, and those being about bugs, not additional development. So there's my $0.02+... i feel your frustration, though. -joe t. On Mar 14, 1:53 pm, Walter Lee Davis wa...@wdstudio.com wrote: Sorry for the rant, but I came to Prototype by way of early exploration with Rails. I found Prototype approachable and learn-able in a way that I didn't (and don't) find jQuery to be. I've invested years in learning Prototype and it has trained and patterned my JavaScript brain. I'm quite cheesed about the notion of having to learn another way to look at JavaScript. At the same time, I can't help but notice the crickets around here lately. When I joined this list (back
[Proto-Scripty] Re: Redrawing Autocomplete Field
When the Autocompleter is initialized, the options are set as such: ... this.options.minChars = this.options.minChars || 1; ... Your 0 evaluates as false-ish, so trips over to 1. i'm pretty sure the reason for requiring at least 1 character in the lookup string is that the result list attempts to highlight the matching string pattern in bold, so when that string is empty, it could cause problems. Mostly that's a guess, but that line in the Autocompleter.baseInitialize is why you can't get a list on empty - it's not actually using your 0. As for why it generates a request on the empty string...i believe that's being triggered by the onKeyPress handler. It's intended to handle key navigation for the INPUT vs. the results list. Since it doesn't trap DELETE or BACKSPACE, it simply less their events pass through the handling down to this section: this.changed = true; this.hasFocus = true; if(this.observer) clearTimeout(this.observer); this.observer = setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000); It tells other methods that the value has changed, has focus, and resets a timer to call the next Ajax request. Since you're handling empty strings on your server side, you see a successful round-trip AJAX request. But Autocompleter doesn't do anything with the result per the reason above. You'd have to write an override function of some sort, and make sure that the empty string doesn't harm other areas of the Autocompleter class. However, i recommend that you note to your user they can use some special character (usually *) to search all, then handle the * on the server side. -joe t. On Mar 15, 12:58 pm, pipplo joe.kos...@gmail.com wrote: Ok, I've done some more debug. The autocomplete text box works still. But it doesn't seem to work with 0 chars. I can see when the user clicks in the text box a request is generated, and a response is generated. I can use the chrome debugger to see that the response is as expected. The AJAX request seems to just not render the HTML when the number of chars is 0, even though it does all the work to generate a request and parse the response. As soon as I type a character I get the expected auto-complete results displayed. When I backspace back to 0 chars it doesn't display anything, but it still does the AJAX request. There must be a place in prototype.js where there is a decision to render the html or not? I can't seem to find it. So I'm just looking for some hints on why that wouldn't happen sometimes.. On Mar 14, 11:27 am, pipplo joe.kos...@gmail.com wrote: I have a weird bug that I'm having trouble debugging. I am using Rails but I think the issue is in the javascript handling somewhere. I have a div with a form and autocomplete div id=form form info autocomplete box /form /div I have the options set so that when the user clicks in the auto- complete they get an initial list (minChars = 0) When the user types a user name in the autocomplete and selects one of the drop down options I generate a request via Ajax and render the form again without the autocomplete. The user can then click 'remove' to remove the user info and re-draw the autocomplete box. After the re-draw the minChars = 0 doesn't work. Whenever I click in the box I see a request generated to my controller, and I return the correct information but it doesn't get rendered into HTML and I dont see a drop down. If the user types a letter or name then the dropdown lits does show up, but the initial ajax request never gets reflected. I assume there is some state variable that thinks the text box hasn't changed value or something which is preventing actually rendering the HTML returned by Rails. I hope that makes sense. Any ideas? P.S. My current workaround is to just hide the autocomplete field and not render it empty. This works but won't be usable in other parts of my site. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] IE stack overflow
I'm so sick and tired of IE... i wish they would just burn it... I'm having issues with a stack overflow and i read that the stack overflows are created from a problem with javascript, so i enabled the debugging of IE and it gave me this error message Object doesn't support this property or method on line 5861. This particular line is the return line from this function: return function(className, parentElement) { return $(parentElement || document.body).getElementsByClassName(className); }; i'm not a javascript guru so i'm not really sure as to what this does but IE doesn't seem to like it... when i use firebug in FF an error shows up saying a handler is not defined on line 5476. Not sure if this has anything to do with each other but firefox doesn't cause any issues. If someone could help out this rookie to find out how to get rid of the stack overflow in IE i would greatly appreciate it. if you need any snippets from anything just ask and i shall deliver... thanks again -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: IE stack overflow
ok, well as i said i was not a javascript guru, but i think i may have found the issue after going through the IE debugger... it appears that lightbox that i'm using is causing the issue with an endless loop or something which is causing the stack overflow. and it is the reason for the handler not defined... when i got rid of lightbox all the issues went away. I don't know enough about javascript to figure out how to make it work properly but i am smart enough to get rid of something that is broke. So no more lightbox. I can prolly make me a simple modal window for my needs... if not, i will just go the old fashion way of doing things :( anyways, if anyone wants to look into what i found i can post more information about such as the lines i found the errors on. thanks for your time guys/gals -- 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.