Re: [Proto-Scripty] Future of prototype.js?
Actually the github version is kinda pre 1.7.4 which drops support for old browsers, fixes some bugs, and other enhancements. Its currently waiting on Andrew to pull the trigger and get it tested and released. Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Aug 4, 2017 at 7:50 AM, <bullm...@gmail.com> wrote: > Are there plans or progress, however slow or delayed, for release(s) of > prototype.js beyond 1.7.3? I've been working with prototype for years and > just recently updated our appliance with the version from September 2015. > Just curious if it's still being actively (if sporadically) developed and, > if so, what the future might hold. > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to prototype-scriptaculous+unsubscr...@googlegroups.com. > To post to this group, send email to prototype-scriptaculous@ > googlegroups.com. > Visit this group at https://groups.google.com/ > group/prototype-scriptaculous. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at https://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
Re: [Proto-Scripty] could some some one build the latest version of prototype.js for me???
Walter Davis has a CDN that he runs I added 1.7.3 and the current github build to that CDN. The current build is tagged 1.7.4-dev http://cdnadmin.freewaypro.com/libraries/16 Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Oct 7, 2016 at 1:42 AM, Pong Mok <vtsuper...@gmail.com> wrote: > I spend whole date to build the latest version of prototypejs but still > fail > > I get SSL error when using gem install rake and rake fail again. > > so could someone do me a favour, please share your last build file if you > not mind, thank you so much > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to prototype-scriptaculous+unsubscr...@googlegroups.com. > To post to this group, send email to prototype-scriptaculous@ > googlegroups.com. > Visit this group at https://groups.google.com/ > group/prototype-scriptaculous. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at https://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
Re: [Proto-Scripty] New Bugfix release 1.7.3
There has only been 2 commits to the scriptaculous repo since 1.9 was tagged in 2010, so other than upgrading Prototype in the zip file that scriptaculous is released with I dont think there will be an official release - but I'll ask him just the same Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Oct 2, 2015 at 8:32 AM, Miguel Beltran R. <yourpa...@gmail.com> wrote: > Thanks. > Someone know if script.aculo.us will have a new version or update? > > 2015-10-01 17:22 GMT-05:00 mike <fantaz...@gmail.com>: > >> Great news. Thanks >> >> 02.10.2015 у 00:54 Jason напісаў: >> >> >> Hi Everyone >> >> Andrew just tagged and released 1.7.3 >> >> Read more about it on the blog post >> >> http://prototypejs.org/2015/09/24/prototype-1-7-3/ >> -- >> You received this message because you are subscribed to the Google Groups >> "Prototype & script.aculo.us" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to prototype-scriptaculous+unsubscr...@googlegroups.com. >> To post to this group, send email to >> prototype-scriptaculous@googlegroups.com. >> Visit this group at >> http://groups.google.com/group/prototype-scriptaculous. >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Prototype & script.aculo.us" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to prototype-scriptaculous+unsubscr...@googlegroups.com. >> To post to this group, send email to >> prototype-scriptaculous@googlegroups.com. >> Visit this group at >> http://groups.google.com/group/prototype-scriptaculous. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > > Lo bueno de vivir un dia mas > es saber que nos queda un dia menos de vida > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to prototype-scriptaculous+unsubscr...@googlegroups.com. > To post to this group, send email to > prototype-scriptaculous@googlegroups.com. > Visit this group at http://groups.google.com/group/prototype-scriptaculous > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
[Proto-Scripty] New Bugfix release 1.7.3
Hi Everyone Andrew just tagged and released 1.7.3 Read more about it on the blog post http://prototypejs.org/2015/09/24/prototype-1-7-3/ -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
[Proto-Scripty] JSFiddle
Hi All Just an FYI JSFiddle has been updated with the latest PrototypeJS release, 1.7.2 has been added to the option list for base Frameworks/Libraries to load Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
Re: [Proto-Scripty] datascroller pages not working
Do you know what version of PrototypeJS is loaded. Alot of times upgrading to the latest version (1.7.2 April 2014) will solve problems Is this a Magento environment? If so you might not be able to upgrade Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Jun 5, 2015 at 9:31 AM, Matthew Cserhati csmat...@gmail.com wrote: Hello everybody, I am developing a database in java/javascript and xhtml. What the database does it it houses scientific study archives. On the main page (screenshot included) you can see descriptions of some of these studies. There is also a data scroller which organizes the many studies into different pages (black box on screen shot) This data scroller is represented in the xhtml code like so: h:form styleClass=body !--a4j:region-- *rich:datascroller for=studies renderIfSinglePage=false id=st1 reRender=st2/* rich:spacer height=5/ rich:dataTable However, the problem is that when I click on a page on the website, let's say, page 2, then nothing happens. I opened the javascript console, and as you can see there are three errors (see screenshot), meaning that there is some error with the javascript. I was wondering, if anyone could help me with this. Is it an error with noConflict? I do refer to a number of javascript codes. Thanks for any help, Matthew -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
Re: [Proto-Scripty] Your favourite rich text editor?
I've used FCKeditor (now CKEditor) as well as nicedit in many of my projects. Nicedit no longer has anyone supporting it - but still works rather well. neither of them require any dependencies and work out of the box Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Thu, Apr 23, 2015 at 8:12 AM, Alastair Young alastair.yo...@gmail.com wrote: ah - no. My bad for not explaining better what I'm after. Looking for a rich text editor - preferably based on prototype - to use on a webpage. The inplaceditor in scriptaculous doesn't quite cut it. cheers On 23 April 2015 at 16:07, Phil Petree phil.pet...@gmail.com wrote: I'm sooo old... I use pspad (and have for 10 years)... it's way more advanced than edlin (joke). I really need to update to a modern editor with php on my laptop so I'd be curious as to how everyone has their systems configured. On Thu, Apr 23, 2015 at 11:00 AM, Alastair Young alastair.yo...@gmail.com wrote: Anyone suggest their favourite rich text editor that sits nicely with prototype ? ta muchly -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
Re: [Proto-Scripty] Slider help
So the second parameter sent to the onSlide callback is the Slider object so if you define the onSlide callback like this onSlide : function(value,slider) { //slider refers to the slider control } from what I understand it looks like you are putting an input element next to the slider so you should be able to use the track element of the slider and go to the next sibling ie slider.track.next() I put together a jsfiddle for you - I didnt have your css and html so I used the example from the scripty site - but you should be able to figure it out http://jsfiddle.net/vgmouey2/2/ technically as soon as you have the track element you can do whatever you need - I put a data-* attribute on the track element to tell the callback what element I would be updating - I hope this helps you Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Mar 23, 2015 at 4:22 PM, Kristian Børve kristianboe...@gmail.com wrote: Hi! I have dynamically made multiple sliders with script.aculo.us. But i cant figure out how to refer to the individual slider id or name in the onSlide and onChange function. Here is my code: for (var n=17; n0; n--) { var newSlider = document.createElement('div'); var sliderIdName = 'slide'+n; newSlider.setAttribute('id',sliderIdName); newSlider.className = slider; slider_div.appendChild(newSlider); var nd = document.createElement('div'); nd.className = handle; newSlider.appendChild(nd); (function() { var time_slider = $(sliderIdName); new Control.Slider(time_slider.down('.handle'), time_slider, { range: $R(0, 30), sliderValue: 0, increment: 12, values: arr, //alignY: -5, onSlide: function(value) { //something document.getElementById(slider_name_text_X).innerHTML = sliderIdName + - + value + br; }, onChange: function(value) { //something } }); })(); } So im have a text element (slider_name_text_X) next to every slider (X) telling the slider value. So i want all of these text elements to be connected to each individual slider. I hope u understand my problem and can help, that would be appreciated very much. Thx anyway, BR Kristian :) -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
Re: [Proto-Scripty] Prototype.js 1.4 open source license
According to Andrew it has always been the same License MIT Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jan 14, 2015 at 11:33 PM, Jungan222 bjorn.jungs...@gmail.com wrote: What open source license is used for Prototype.js 1.4? I can not find this old version for download on prototypejs.org Regards, -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
Re: [Proto-Scripty] active elements
ok thats good did trying the activate() method work? Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Aug 27, 2014 at 3:34 AM, Иван Иванов svjaz...@gmail.com wrote: Yes, element is a child of a form element. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
Re: [Proto-Scripty] active elements
It looks like the method you are trying to call is activate() ? http://api.prototypejs.org/dom/Form/Element/prototype/activate/ If so make sure the element you are trying to call this on is a child of a form element Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Tue, Aug 26, 2014 at 5:00 AM, Иван Иванов svjaz...@gmail.com wrote: Hello I trying to accomplish: Try ('name2').active() but nothing happens -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
Re: [Proto-Scripty] Event.observe
But it does work See this fiddle http://jsfiddle.net/4MUZ4/ also make sure you are running the observe method after the DOM has finished loading and is ready to be manipulated Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Jul 13, 2014 at 11:33 PM, Иван Иванов svjaz...@gmail.com wrote: Hi Team, input id=login type='submit' value='login' / Event.observe(login, click, function(){ alert(t2); }); Why don't work? Thanks -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
Re: [Proto-Scripty] Is there any way to cancel an Ajax request once it's been issued?
You can call .abort() on the transport property of Ajax, its part of the internal xmlhttprequest object https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest so for var foo = new Ajax.Request() foo.transport.abort(); but YMMV as the server might still continue to process the request and the abort() might only kill the callbacks but not the process in the server. Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Tue, Apr 15, 2014 at 6:13 PM, Walter Lee Davis wa...@wdstudio.comwrote: I've looked through the API a couple of different times, and I can't see a way to do that. I've tried assigning a variable to it: var foo = new Ajax.Request() but re-assigning foo to point to a different request doesn't stop the first one -- it carries on like it was still there, and chews up server resources. I've read through the source, and there's nothing there about stopping the request that I can see. Any ideas? Walter -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
Re: [Proto-Scripty] problem with autocomplete on chrome v 33
Does the error refer to a property of document being deprecated? That bug is fixed in the latest github repo code I have a build of it hosted on CDN here = http://cdnadmin.freewaypro.com/libraries/16 The PrototypeJS Core Devs are trying to scrape together enough time to get a public release out that fixes this problem and several others Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Mar 17, 2014 at 2:40 PM, gjergj sheldija gjergj.sheld...@gmail.comwrote: hi all, i have the following code : input type=text id=search name=search / div id=hint/div script type=text/javascript var includeScript = include/inc_search_medicaments.php?; var auto_1 = new Ajax.Autocompleter ( search, hint, includeScript, { afterUpdateElement : setSelectionId, autoSelect: true, minChars: 2, callback:funxSerialize } ); function setSelectionId(text, li) { document.getElementById('atc').value = li.id; } function funxSerialize() { return Form.serialize($('infoform')) ; } /script it works perfectly on firefox but has a strange error in chrome v. 33. it does not submit any params via post. i've updated the libs to the latest version, but still no effect :( any hint ? gj. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
[Proto-Scripty] Updates to PrototypeJS
Hey everyone There have been many updates to the PrototypeJS github repo since the last public release (1.7.1, August 2012) Most notably - attribute check fixes for IE 10 and IE 11 (Identifier expected error every time a page loads) - offset fixes for Chrome 33+ (fixes Draggables and Droppables with Script.aculo.us) - option of removing the extra X-* headers in AJAX requests to handle CORS requests I've taken some time to make sure there are builds with all of these fixes included, as well as some fixes that have been submitted but are not in the main repo yet. But to get a public release out the door so that everyone gets to benefit, we all will need to help out. Walter and I think that we need to put a little encouragement behind the core team to get things going. If you want to skip a morning coffee one morning, please send it to @andrewdupont with Starbucks Tweet-a-Coffeehttps://www.starbucks.com/tweet-a-coffee or if you want to contribute something more or more regularly join the GitTip PrototypeJS community https://www.gittip.com/for/prototypejs/ and send as little or as much as you want. Twitter @andrewdupont or Github @savetheclocktower I personally have already added my credit card and have started contributing at $2 a week Thanks Everyone! Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/d/optout.
[Proto-Scripty] Presentation : Prototype.js for jQuery Afficionados
Please take a look at this presentation done by Phil Jackson http://blog.philwinkle.com/prototype-js-for-jquery-afficionados/ -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/groups/opt_out.
[Proto-Scripty] Chrome 32 and Scriptaculous Drag and Drop
Hi All Just a fair warning Chome 32 deprecated document.body.scrollTop/scollLeft -- so when implementing Draggables and Droppables in Scriptaculous the location of the element that is dragged will not be in the correct place as well as won't fire the dropped correctly. I've added the logic/polyfill to the Element#cumulativeScrollOffset() method (where the problem is) and submitted the Pull request. The Pull request was merged in to main trunk a week ago. If you are having problems with Draggables/Droppables/Element#cumulativeScrollOffset() please update to the latest github version. If you cannot build from the github repo - there are built versions in my github repo here - https://github.com/jwestbrook/prototype Walter also has a CDN setup and the latest build from my repo is hosted there as well http://cdnadmin.freewaypro.com/libraries/16 Thanks everyone! -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Show of hands
I continue to use Prototype and Scriptaculous in all of my own projects - period. I'm also answering any questions to the best of my ability in the prototypejs and scriptaculous tags on StackOverflow, any twitter searches that come up with prototypejs in them etc. Looking towards the future - I have requested multiple times for the core devs to integrate the changes I have made in my fork of prototype - however anyone can look at the repo and benefit from the updates and changes. I have integrated many updates and bug fixes and the like as well as updated the build process and unit tests to use newer methods (nodejs and phantomjs vs ruby). The repo is CI tested with Travis on every commit. I am currently working on a documentation builder that uses nodejs. Everyone please take a look and comment or file issues etc --- Walter has also requested me to take a look at the Scriptaculous library and see if I can make the same type of updates to them - when I get the documentation generator up and running for Prototype Core I'll be moving to that. Anyone that would like to help integrating updates in my repo is welcome but please bear in mind - these are not getting into real core repo until Andrew takes a look at them (which also means that any CDN's wont update either) https://github.com/jwestbrook/prototype I also have a fork/port of Twitter Bootstrap that uses Prototype instead of jQuery - it only fully supports 2.3.2 right now - I am still working on Bootstrap 3 components https://github.com/jwestbrook/bootstrap-prototype I've also taken some of the libraries on scripteka that seem to either be missing or outdated and have re-hosted them on my github so they dont get lost. Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Jan 3, 2014 at 8:45 AM, Dave Kibble davekib...@gmail.com wrote: Happy New Year to you too. I'm not a power user but maintain a site with lots of widgets that are Prototype based, including wide use of TableKit and Ajax pop-up editors. I've been holding off investing too heavily in scriptaculous and Prototype because of the uncertainty but on the flip side have a big job to convert to anything else. thanks for your support on this forum though - it's comforting to know there's some out there. If Prototype were open-sourced with the enthusiasts maintaining it I would feel much better about it. cheers Dave On 3 January 2014 14:01, Walter Lee Davis wa...@wdstudio.com wrote: It's been mighty quiet here, and I'm wondering if everyone just knows how to use Prototype, and doesn't have any questions, or if you've all defected to the Dark Side. Happy New Year, Walter -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous . For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Re: Need Help With Prototype Selectors API
If you want to select any elements that are child of a specific element you can do so like this $('myparentelement').select('span'); will select all spans that are children of the element with id myparentelement Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Tue, Jul 16, 2013 at 1:13 AM, Ubik emiliano.lepor...@gmail.com wrote: I guess you need to include Prototype in the parent document too. BTW, use $$ to select elements in your document: $$('div') will give you any DIV element in your current document, almost like document.querySelectorAll; use $( id ) as a replacement of document.getElementById( id ) On Monday, July 15, 2013 10:14:05 PM UTC+2, Balaram Das Mahant wrote: I am new to Prototype, I have a webpage and an iframe in it. I am loading Prototype in my iframe and am trying to use Selector API to get DOM references for elements of my parent window. Eg: Selector.findChildElements(**document,['div']) is returning references to DIV elements of iframe's document. But,Selector.** findChildElements(parent.**document,['div']) is not returning any references to DIV elements of parent's document. Instead, giving an error TypeError: Cannot call method 'identify' of null. When I deep dive into code, I find 'Element' is actually adding 'identify' method (which is in my iframe context, which is addigning a dummy 'id' attribute). First of all my understanding of Prototype and its Selector API is poor, please suggest a way I can use Selector API to fetch references to DOM elements of my parent document. Thanks in Advance. -Balaram. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous . For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Prototype Documentation
Hi Marco There is nothing official other than those 2 pages - however there are plenty of examples that the community has written all over Stack Overflow http://stackoverflow.com/questions/tagged/prototypejs Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Jun 24, 2013 at 6:48 AM, marco del corto ma...@delcorto.it wrote: Does exists further documentation , in addition to that present in http://prototypejs.org/ and http://api.prototypejs.org/ ? Would help especially examples of use of the code thanks -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous . For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous. For more options, visit https://groups.google.com/groups/opt_out.
[Proto-Scripty] Function.bind() performance vs native
ECMA 5 introduced Function.prototype.bind() which is similar to the PrototypeJS version that binds the context to the function. In a class scope you can bind the this variable in the function scope to the this of the class. Here is a performance test between those 2 http://jsperf.com/native-function-bind-versus-prototype-js Higher numbers are better as that is the number of operations per second and the native bind() method is higher? Anyone have any insight? Thanks all! -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Function.bind() performance vs native
Chrome on OSX with Prototype winning as well - I was just curious as to why the native implementation is slower than the Prototype implementation? Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Jun 3, 2013 at 5:06 PM, Walter Lee Davis wa...@wdstudio.com wrote: I believe that the plan all along w/r/t these new JS-core features has been to prefer the native implementation where available and compatible, and leave the Prototype method as a polyfill for older browsers. I don't believe that Prototype currently behaves this way, but the last time I heard anything official on this list about the future of Prototype, that was one of the things mentioned. BTW, what browser were you using when you tested this? In Safari.latest Mac OS X, I see Prototype winning, and native 17% slower. Walter On Jun 3, 2013, at 5:44 PM, Jason wrote: ECMA 5 introduced Function.prototype.bind() which is similar to the PrototypeJS version that binds the context to the function. In a class scope you can bind the this variable in the function scope to the this of the class. Here is a performance test between those 2 http://jsperf.com/native-function-bind-versus-prototype-js Higher numbers are better as that is the number of operations per second and the native bind() method is higher? Anyone have any insight? Thanks all! -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Help system
If you want to use tooltips or popovers you could use the PrototypeJS Twitter BootStrap tooltips or popovers https://github.com/jwestbrook/bootstrap-prototype Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Thu, May 30, 2013 at 3:28 PM, Walter Lee Davis wa...@wdstudio.comwrote: I think you could make the whole thing pretty simply. Rather than creating a separate handler (with each()) for each .help element, you could wrap the entire thing in one on handler, which you would not need to customize per page or worry about dom:loaded or anything: document.on('click', '.help', function(evt, elm){ var tip = elm.down('div'); new Ajax.Updater(tip, 'path/to/help', { parameters: {id: elm.id}, onCreate: function(){ tip.addClassName('loading'); }, onSuccess: function(){ tip.removeClassName('loading'); tip.addClassName('tooltip'); } }); }); document.on('click', '.tooltip', function(evt, elm){ evt.stop(); elm.update().removeClassName('tooltip'); }); That's expecting a structure like this: div class=help id=widget_1div/div/div You could use some other construction if you like, but that would do the trick. The rest will be creating the CSS for the tooltip, and the Web service to fill it in. If you didn't want to get the Ajax thing going, you could also just put the tooltip in the help element itself, maybe in a data-attribute. That depends on how much content there would be. It would be completely instantaneous. Walter On May 30, 2013, at 2:24 PM, Phil Petree wrote: I'll play around with it on Sunday and see what I can cobble together... of course it looks like you did most of the work in 5 minutes and I'll spend most of the day playing around with it! LOL -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] IE7
I'm sorry if this is not exactly what you asked but I'm going to try and point out a few problems and see if that answers your question. Firstly you cannot declare a src attribute and put javascript in the same script tag You do not need to re-extend the variable t after you have created a new Element - it is already extended. You have your statements out of order which is why it is probably not working. You are adding t to $('div') immediately instead of building the entire contents of t then inserting into cont Try this div id='div'/div script src=javascript/ie7.js/script script var cont=$('div'); var t=new Element('table',{'width':'200px'}); var tr=new Element('tr'); var td=new Element('td').update('hello'); tr.insert(td) t.insert(tr); cont.insert(t); /script Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sat, May 11, 2013 at 10:36 AM, Александр Павленко aleksl...@gmail.comwrote: Почему не работает такой код IE7 div id='div'/div script src=javascript/ie7.js var cont=$('div'); var t=new Element('table',{'width':'200px'});Element.extend(t); cont.insert(t); var tr=new Element('tr');Element.extend(t); var td=new Element('td').update('hello');Element.extend(t); t.insert(tr); tr.insert(td) /script -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Draggables inside div with overflow:scroll
I actually had the exact same problem with the Draggables and Droppables If you add {ghosting:true} to the options then Draggables will create a copy of the DIV and attach it to the body element, (outside the containing scrolling div) - but the downside is when you drop it you have to recreate the div in the new drop zone you also need to add revert : function(e){ e.style.position = relative; e.style.zIndex = ''; return false; }, to the Draggables so when it reverts and goes back to the draggable list the styles are not all screwed up I've updated the jsfiddle with the changes I've suggested http://jsfiddle.net/nB8PC/3/ take a look and see if that works for you Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Tue, May 7, 2013 at 4:30 AM, ayson...@gmail.com wrote: I have created two divs. One is for draggable objects. Another for the area where they should be dropped. The both divs should have the same height and if there are large number of draggables to have scrollbar. When I add *overflow: scroll* to the div with draggable objects, then drag-and-drop functionality is screwed up. Please see an example here http://jsfiddle.net/nB8PC/1/ To reproduce my issue just enable *overflow:scroll* in CSS window (upper right, it is commented out) and run the script again. Is there any solution for it? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Has anyone run into a problem with using Imagemapster?
Hi Erik Imagemapster is a jQuery plugin and depends on jQuery to work - jQuery and Prototype can work together if you do it in the right order first load jQuery then immediately run jQuery.noConflict() then load Prototype. jQuery uses the $() method by default - same as Prototype so the noconflict() method releases the $() method for Prototype. So for the Imagemapster to work correctly - make sure you have jQuery loaded and then call it like this jQuery('#usa').mapster({ // rest of options }); If this doesnt work then the Imagemapster javascript code depends on the $() method to be pointing to jQuery - all you need to to is replace the $() with jQuery() and then it should work Let me know if you need anymore help Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, May 5, 2013 at 3:37 PM, Erik Sjaastad spudlo...@gmail.com wrote: Hi! Very happy to have found Prototype this morning. It's really made my day a lot better :) Except that I noticed that once I included it, my other plugin Imagemapster http://www.outsharked.com/imagemapster/ stopped working. I've email James to see if he knew of a solution. I thought maybe someone here might have had or seen a similar problem. Looking forward to building a lot more with Prototype from now on. Cheers -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] determine if any of checkbox[] is checked
typically when I build forms like that I have a database that is giving me all the data so I only have to update the loop once for all the checkboxes :-) but yes you can use the $$() Selector method to use the names - I think you have to do it this way though $$(input[name='kitcat[]']:checked)//but I'm not sure how Sizzle will handle the bracket in the name or $(input[name^='kitcat']:checked) //this is probably more safe but it will match more elements as it gets all elements that have a name attribute that starts with kitcat (starts with is ^= instead of =) Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Mar 31, 2013 at 11:46 AM, Phil Petree phil.pet...@gmail.com wrote: Hey Jason... I guess the rest of the group are all slugs! How dare they take Easer off! LOL I had kinda come to the same conclusion... what I implemented was: if($$('input:checked').length 0) return true; This kind of works because the ONLY input on this page are checkboxes (think of a wizard) but I was really looking to pass names (kitcat[]) in so that it could be more flexible and accomodate future mods. In your method, I need to mod all 17 checkboxes to include the same class name which is currently: validate-onein-group Is there a way to collect all checkboxes with the same name? On Sun, Mar 31, 2013 at 11:54 AM, Jason Westbrook jwestbr...@gmail.comwrote: Try adding a separate class to all of your checkboxes that are in the group and then do this if( $$('.groupchecks:checked').length == 0 ) { //no checked checkboxes { Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Mar 31, 2013 at 8:30 AM, Phil Petree phil.pet...@gmail.comwrote: Happy Easter! I have an array of checkboxes on a form (about 15 of them) arranged in rows like this: trtdinput type='checkbox' name='kitcat[]' .../tdtdname/tdtddescription/td/tr What I have been trying to use is this: $(input:checkbox[name=kitcat]:checked).each(function() { // if one is checked, we validated return true; }); What I'm getting is an error saying: Unable to get value of the property 'each': object is null or undefined What's the trick to this? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] determine if any of checkbox[] is checked
Prototype has a method for what you are trying called any() http://api.prototypejs.org/language/Enumerable/prototype/any/ you create an iterator function and pass it to any var elmName = input:checkbox[name=' +element.name +']; var bChecked = false; // not validated var anychecked = $$(elmName).any(function(n) { return n.checked; }); anychecked will be true or false Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Apr 1, 2013 at 10:49 AM, Phil Petree phil.pet...@gmail.com wrote: // this works with names that contain spaces and arrays[]... Validation.add('validate-one-array', 'Error message text', function(value, element) { var elmName = input:checkbox[name=' +element.name +']; var bChecked = false; // not validated $$(elmName).each(function(elm) { if( $(elm).checked ) bChecked = true; // if one is checked, we validated }); return bChecked; }); On Mon, Apr 1, 2013 at 1:15 PM, Jason Westbrook jwestbr...@gmail.comwrote: typically when I build forms like that I have a database that is giving me all the data so I only have to update the loop once for all the checkboxes :-) but yes you can use the $$() Selector method to use the names - I think you have to do it this way though $$(input[name='kitcat[]']:checked)//but I'm not sure how Sizzle will handle the bracket in the name or $(input[name^='kitcat']:checked) //this is probably more safe but it will match more elements as it gets all elements that have a name attribute that starts with kitcat (starts with is ^= instead of =) Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Mar 31, 2013 at 11:46 AM, Phil Petree phil.pet...@gmail.comwrote: Hey Jason... I guess the rest of the group are all slugs! How dare they take Easer off! LOL I had kinda come to the same conclusion... what I implemented was: if($$('input:checked').length 0) return true; This kind of works because the ONLY input on this page are checkboxes (think of a wizard) but I was really looking to pass names (kitcat[]) in so that it could be more flexible and accomodate future mods. In your method, I need to mod all 17 checkboxes to include the same class name which is currently: validate-onein-group Is there a way to collect all checkboxes with the same name? On Sun, Mar 31, 2013 at 11:54 AM, Jason Westbrook jwestbr...@gmail.comwrote: Try adding a separate class to all of your checkboxes that are in the group and then do this if( $$('.groupchecks:checked').length == 0 ) { //no checked checkboxes { Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Mar 31, 2013 at 8:30 AM, Phil Petree phil.pet...@gmail.comwrote: Happy Easter! I have an array of checkboxes on a form (about 15 of them) arranged in rows like this: trtdinput type='checkbox' name='kitcat[]' .../tdtdname/tdtddescription/td/tr What I have been trying to use is this: $(input:checkbox[name=kitcat]:checked).each(function() { // if one is checked, we validated return true; }); What I'm getting is an error saying: Unable to get value of the property 'each': object is null or undefined What's the trick to this? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr
Re: [Proto-Scripty] determine if any of checkbox[] is checked
Try adding a separate class to all of your checkboxes that are in the group and then do this if( $$('.groupchecks:checked').length == 0 ) { //no checked checkboxes { Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Mar 31, 2013 at 8:30 AM, Phil Petree phil.pet...@gmail.com wrote: Happy Easter! I have an array of checkboxes on a form (about 15 of them) arranged in rows like this: trtdinput type='checkbox' name='kitcat[]' .../tdtdname/tdtddescription/td/tr What I have been trying to use is this: $(input:checkbox[name=kitcat]:checked).each(function() { // if one is checked, we validated return true; }); What I'm getting is an error saying: Unable to get value of the property 'each': object is null or undefined What's the trick to this? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Form Validator
I usually home brew one that looks for the required class and then adds an error class to that element and then at the end of the function test if there are 0 elements with the error class Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Tue, Mar 26, 2013 at 9:33 AM, Phil Petree phil.pet...@gmail.com wrote: Has anyone found a good form validator? I have been using the one by Andrew Tetlaw for several years and its worked really well but now with proto 1.7 and ie 9 I'm finding it no longer works (as in it doesn't see select where no option has been chosen. i.e. http://www.presspeek.com/contact/select.html I've rooted around but all the validators I found were all written circa 2007 - 2008. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] color swatch selector
Sorry then I misunderstood where the CSS was being applied - yes the radio input does get the pseudo class but not the parent elements Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Thu, Mar 21, 2013 at 11:40 AM, Walter Lee Davis wa...@wdstudio.comwrote: Really? Can you show an example? I don't think the label.swatch itself gets a :checked pseudo-class, it's the input inside it that gets checked. While you can find the :checked checkbox, you can't style upward like that to access the parent label (really wish you could). Walter On Mar 21, 2013, at 1:57 PM, Jason Westbrook wrote: For the CSS for the radio buttons use the pseudo class label.swatch:checked -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Re: How to prevent doubleclicking on links
What you are probably detecting is not just the double click event but a second click event that is delayed enough from the original click to cause a new click event so what I propose is to identify if you are currently running the click handler then either stop() the 2nd event or return inside the handler Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Mar 15, 2013 at 4:38 AM, Maciej Zaleski mzjadame...@gmail.comwrote: Ok, seems to be fixed in about 80%. I added line ondblclick = javascript:location.reload() to my div, and every time user is doubleclicking on menu, page doesn't break but its being refreshed instead. It's not perfect solution but it works. If u have better one , plese write. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] AutoComplete
Hey Walter - I don't think that Miguel is using Scriptaculous Autocomplete, as I can't find the code snippet in the emails - plus I use Scriptaculous Autocomplete with some of my production sites with latest PrototypeJS Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Thu, Mar 14, 2013 at 9:22 AM, Walter Lee Davis wa...@wdstudio.comwrote: Please file an issue on Scriptaculous, then. Scripty 1 should stay in step with Prototype! Walter On Mar 14, 2013, at 11:34 AM, Miguel Beltran R. wrote: I fixed it :D #Walter The problem were here var pos = Position.cumulativeOffset(this.input); pos.push(pos[0] + this.input.offsetWidth); -- HERE STOP In 1.7, the cumulativeOffset function return a Object {top:x, left:y} when in 1.6 returned an array, howerver the object has the toArray function , so I changed it to var pos = Position.cumulativeOffset(this.input).toArray(); #Jason I have checked Script2 but no Script1, the version 2 of autocomplete don't like me. 2013/3/13 Walter Lee Davis wa...@wdstudio.com What do you see in Firebug or Web Inspector's console? Can you please post an example showing your work so far? We will be happy to help, but without setting up a demo locally, it's going to be difficult for us to divine exactly where the problem is. Walter On Mar 13, 2013, at 3:18 PM, Miguel Beltran R. wrote: Hello List!!! I have tried to use AutoComplete 1.2 (1) but it is not working with prototype 1.7. someone know another working library?or tell how fix it The problem that I have is with the position, using Firebug for debug _reposition: function() { if(!this.drawn) return; var pos = Position.cumulativeOffset(this.input); pos.push(pos[0] + this.input.offsetWidth); -- HERE STOP pos.push(pos[1] + this.input.offsetHeight); Element.setStyle(this.selector,{ left: pos[0] + 'px', top: pos[3] + 'px' }); }, (1) http://www.beauscott.com/examples/autocomplete/doc/ns_examples.html -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] .morph has stopped working - it now says Object [object Object] has no method 'morph'
I see 2 includes of Scriptaculous This link href= https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js; / and this script type=text/javascript src=http://script.aculo.us/prototype.js /script script type=text/javascript src=http://script.aculo.us/scriptaculous.js /script loading it twice will give you problems Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Thu, Mar 14, 2013 at 9:28 AM, Walter Lee Davis wa...@wdstudio.comwrote: On Mar 14, 2013, at 7:58 AM, Gretsch wrote: My code used to work, but now the .morph no longer works - in the chrome console it says: Uncaught TypeError: Object [object Object] has no method 'morph' The code includes the following: link href= https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js; / script type=text/javascript src=http://script.aculo.us/prototype.js /script script type=text/javascript src= http://script.aculo.us/scriptaculous.js;/script But when I look at the code using Chrome 'Elements' pane it shows: link href= https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js script src= https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.iRGda-ATQBk.O/m=plusone/am=QQ/rt=j/d=1/rs=AItRSTMWXweuF4qvyKvRjzAhTggmGqAPyA/cb=gapi.loaded_0; async=/script script type=text/javascript async= src= https://apis.google.com/js/plusone.js; gapi_processed=true/script script id=twitter-wjs src=//platform.twitter.com/widgets.js /script script type=text/javascript src=http://script.aculo.us/prototype.js /script script type=text/javascript src= http://script.aculo.us/scriptaculous.js;/script script type=text/javascript src=http://script.aculo.us/builder.js /script ... script type=text/javascript src=http://script.aculo.us/sound.js /script Can someone tell me where the extra lines come from e.g.: script src= https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.iRGda-ATQBk.O/m=plusone/am=QQ/rt=j/d=1/rs=AItRSTMWXweuF4qvyKvRjzAhTggmGqAPyA/cb=gapi.loaded_0; async=/script and if this/something else is causing the problem. The working code can be seen at: http://www.alanarnoldguitars.co.uk/guitar_woods.htm (but the code is compressed) and the version where the 'minimise' button doesnt work is currently at: http://www.alanarnoldguitars.co.uk/guitar_woods_UNCOMPRESSED.htm You have a couple of errors right away on page load, before we even get into the rest of this: guitar_woods_UNCOMPRESSED.htm:20 SyntaxError: Unexpected token '' prototype.js:5733 TypeError: 'undefined' is not a function (evaluating 'element.dispatchEvent(event)') See if you can get the first one fixed, because the second one is Prototype reacting badly to what it is given, and is highly unlikely to be an actual error in the Prototype code itself. JavaScript errors tend to trickle down, and one can hide another. Also try multiple debuggers -- this is from Safari Web Inspector, but do try Firebug too. Walter Thanks -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] AutoComplete
Are you set against using the Autocomplete in Script.aculo.us? http://madrobby.github.com/scriptaculous/ajax-autocompleter/ It works with the latest PrototypeJS and Script.aculo.us is probably already loaded on your site if you are using any of the effects Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Mar 13, 2013 at 12:18 PM, Miguel Beltran R. yourpa...@gmail.comwrote: Hello List!!! I have tried to use AutoComplete 1.2 (1) but it is not working with prototype 1.7. someone know another working library?or tell how fix it The problem that I have is with the position, using Firebug for debug _reposition: function() { if(!this.drawn) return; var pos = Position.cumulativeOffset(this.input); pos.push(pos[0] + this.input.offsetWidth); -- HERE STOP pos.push(pos[1] + this.input.offsetHeight); Element.setStyle(this.selector,{ left: pos[0] + 'px', top: pos[3] + 'px' }); }, (1) http://www.beauscott.com/examples/autocomplete/doc/ns_examples.html -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Element.setValue() doesn't work with the output tag
I ran this in Google Chrome on OSX and got a JS error HTMLOutputElement has no method 'setValue' It looks like the output element is not being extended - There was a ticket for SVG elements to be extended as well that I took care of and I'll put a pull request for this in as well https://github.com/sstephenson/prototype/pull/97 Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Mar 6, 2013 at 9:54 AM, Phil Petree phil.pet...@gmail.com wrote: Not sure what you're expecting but under ie 9, neither worked for me... not even in compatibility mode. On Wed, Mar 6, 2013 at 11:20 AM, Walter Lee Davis wa...@wdstudio.comwrote: Have a fiddle: http://jsfiddle.net/ZYDjc/ Any thoughts? Should I raise a ticket? Thanks, Walter -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Copying border styles: a tale of two browsers
I'm using OSX Chrome and it does it correctly as does Safari .getStyle() either uses the inline style via the .style property of the DOM object if that is not set then it tries to use document.defaultView.getComputedStyle(element, null) which is returning nothing for the border property have you tried to use http://api.prototypejs.org/dom/Element/prototype/getLayout/ ? Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Mar 1, 2013 at 4:42 PM, Walter Lee Davis wa...@wdstudio.com wrote: Try this example in Safari, Chrome, and Firefox, latest versions. Please let me know what you see. http://scripty.walterdavisstudio.com/copy-style-fail.html Safari gets it right, Firefox and Chrome do not, and I'm baffled. Digging into the issue in Firebug, it appears as though defaultView.getComputedStyle is only populating the fully-decomposed border properties: border-left-color, border-left-width, etc. None of the intermediate shortcut attributes have any value assigned to them at all. Any suggestions? Thanks, Walter -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Limit number of draggables
I don't have an example right now but I can tell you how I do it When I want just one draggable to be dropped - I destroy the draggable after the drop happens or hide the dropzone and show a filled element so that the user knows that there is something in it I can dig up an example later if you need one Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Feb 25, 2013 at 7:29 AM, Jeff Hight j...@jeffhight.com wrote: Could someone shoot me a quick example of how to limit the number of draggables a droppable can contain to just one? Thanks! jH -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] PeriodicalExecuter and Ajax calls
I've had this happen to me Consider a simple Ajax.Request() that is part of a click observer If a user clicks multiple times on the element that is being observed the Ajax.Request() is fired multiple times in the typical situation of the PeriodicalExecuter this would be a interval that is being fired - but if the interval is fired again while the ajax request is still running you get stacked requests or a race condition. So instead PeriodicalExecuter will prevent that from happening and handle the interval firing Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Feb 17, 2013 at 11:57 AM, kstubs kst...@gmail.com wrote: PeriodicalExecuter shields you from multiple parallel executions of a callback function Is this the case for Ajax calls? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] document.viewport IE in Quirks mode
Try this http://stackoverflow.com/questions/623047/how-to-detect-render-mode-of-browser-for-current-page Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Feb 6, 2013 at 7:50 AM, kstubs kst...@gmail.com wrote: When I do this: document.viewport.getDimensions() I get 0 for height and 0 for width if the IE browser is in Quirks mode. This may or may not be a bug, I get that. So my question is: Can you determine through javascript what the browser mode is? If Browser Is Quirky .. sound the alarm .. Otherwise .. code as usual .. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] scripty inplace editor
No problem - I have a grid of inplaceeditor's running about 60 instances on one page so it took a few trys to make it work like I needed Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Jan 28, 2013 at 6:28 AM, Phil Petree phil.pet...@gmail.com wrote: Jason, ended up spending a few hours rewriting some of my code in order to try your code. Instead of dom:ready I implemented the inplace editor onComplete and its working fine. Still not sure why cancel doesn't actually kill the invocation or why editor.dispose(); prevents the editor from actually working... Either way, this implementation is up! Thanks again! On Sun, Jan 27, 2013 at 6:51 PM, Jason Westbrook jwestbr...@gmail.comwrote: So the actual problem is that you are creating multiple inplace editors - create it once and let the inplace editor handle the click events I answered a similar question in more depth on StackOverflow http://stackoverflow.com/questions/14306045/codeigniter-script-aculo-us-inplaceedit-produces-duplicates-on-update/14313622#14313622 Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Jan 27, 2013 at 3:24 PM, Phil Petree phil.pet...@gmail.comwrote: Thanks Walter. I tried that already and found the editor to be essentially disabled (you could click but not get the form). On Jan 27, 2013 6:14 PM, Walter Lee Davis wa...@wdstudio.com wrote: On Jan 27, 2013, at 4:10 PM, Phil Petree wrote: Hi All! I'm implementing the scriptaculous inplace editor and I have it working except for one small detail: If I activate the editor, click cancel, activate the editor again I get two inplace editors. cancel those and activate again and I get three. cancel those and activate again and I get four... and on and on and on... What's the trick to this? Here's my code: html: trtd onclick='editName(this, id)'Homer Simpson/td/tr javascript: function editName(element, id) { new Ajax.InPlaceEditor(element, 'name_inpl_ajax.php', { okText: Save , cancelControl: button, callback: function(form, value) { return 'id=' +id + 'name='+encodeURIComponent(value) } }); } This editor isn't behaving as documented lately, I had an occasion to upgrade a working editor to the latest versions of Prototype and Scriptaculous, and found that clicking to edit the second time would cause the editor to load the editing form itself for editing. Not a good time for my client! You might want to look at this option: Removing the behavior To disable the InPlaceEditor behavior later on, store it in a variable like: var editor = new Ajax.InPlaceEditor('product_1' ,...); (... do stuff ..) editor.dispose(); This way, you can enable and disable In Place Editing : http://madrobby.github.com/scriptaculous/in-place-editing at will. See if that can work around the issue for you. 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. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr
Re: [Proto-Scripty] scripty inplace editor
So the actual problem is that you are creating multiple inplace editors - create it once and let the inplace editor handle the click events I answered a similar question in more depth on StackOverflow http://stackoverflow.com/questions/14306045/codeigniter-script-aculo-us-inplaceedit-produces-duplicates-on-update/14313622#14313622 Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Jan 27, 2013 at 3:24 PM, Phil Petree phil.pet...@gmail.com wrote: Thanks Walter. I tried that already and found the editor to be essentially disabled (you could click but not get the form). On Jan 27, 2013 6:14 PM, Walter Lee Davis wa...@wdstudio.com wrote: On Jan 27, 2013, at 4:10 PM, Phil Petree wrote: Hi All! I'm implementing the scriptaculous inplace editor and I have it working except for one small detail: If I activate the editor, click cancel, activate the editor again I get two inplace editors. cancel those and activate again and I get three. cancel those and activate again and I get four... and on and on and on... What's the trick to this? Here's my code: html: trtd onclick='editName(this, id)'Homer Simpson/td/tr javascript: function editName(element, id) { new Ajax.InPlaceEditor(element, 'name_inpl_ajax.php', { okText: Save , cancelControl: button, callback: function(form, value) { return 'id=' +id + 'name='+encodeURIComponent(value) } }); } This editor isn't behaving as documented lately, I had an occasion to upgrade a working editor to the latest versions of Prototype and Scriptaculous, and found that clicking to edit the second time would cause the editor to load the editing form itself for editing. Not a good time for my client! You might want to look at this option: Removing the behavior To disable the InPlaceEditor behavior later on, store it in a variable like: var editor = new Ajax.InPlaceEditor('product_1' ,...); (... do stuff ..) editor.dispose(); This way, you can enable and disable In Place Editing : http://madrobby.github.com/scriptaculous/in-place-editing at will. See if that can work around the issue for you. 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. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Proto-Scripty] Toggle opacity
Instead of running each() on each element to run the Effect take a look a Effect.multiple() http://madrobby.github.com/scriptaculous/effect-multiple/ it will do the heavy lifting for you and makes the code more readable Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jan 23, 2013 at 7:05 AM, Walter Lee Davis wa...@wdstudio.comwrote: On Jan 23, 2013, at 7:48 AM, Köd wrote: Hi guys To get a full view of my problem, please read: http://stackoverflow.com/questions/14478903/script-aculo-us-toggle-appear-on-multiple-divs _ I have a simple question to ask you: Is it possible to use effect.opacity as a toggle effect? The reason why I'm asking this is because when using effect.opacity the assigned function can be spammed, hence making the div appear/fade over and over. I was thinking that it might would be possible to do so by changing something in the scriptaculous.js or effects.js file. If this is not possible, I would like to ask how you can use Effect.Toggle (appear) on multiple div's within an a href containing an onclick. An example: lia href=# onclick=Effect.toggle('DIV1, DIV2, DIV3', 'appear'); return false;/a It's going to be really hard to do this inline (I suppose it's possible, but not very readable) but if you create an observer function, then there should be a way to do this: var toggleMyItems = function(items){ $w(items).each(function(elm){ var elm = $(elm); if(elm ! elm.animating){ elm['animating'] = true; Effect.toggle( elm, 'appear', { afterFinish: function(){ elm.animating = false; } } ); } }); }); Then you could call that from inline: a href=# rel=DIV1 DIV2 DIV3 onclick=toggleMyItems(this.rel); return false;Howdy/a Or better, observe the click and do it elsewhere (separation of concerns): document.on('click', 'a.multi', function(evt, elm){ evt.stop(); toggleMyItems(elm.rel); }); a href=# class=multi rel=DIV1 DIV2 DIV3Howdy/a Walter Thanks. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/_mWlqcRjEnIJ. 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?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?hl=en.
[Proto-Scripty] PrototypeJS Docset in Dash OSX App
Hey all If you use Dash on OSX - there is a PrototypeJS docset available now Dash 1.7.7 is live on the Mac App Store. Comes with @LaunchBar integration and a @PrototypeJS documentation set https://t.co/XuY3HolE Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/AAxvzetUXJcJ. 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.
Re: [Proto-Scripty] Ajax CORS error message
In the latest DEV version hosted on github you can remove the X-* HTTP headers that PrototypeJS puts into the AJAX requests that make the CORS pre-flight requests fail. Check out this pull request https://github.com/sstephenson/prototype/pull/88 Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jan 16, 2013 at 2:43 PM, Dave Lazar hunkyb...@gmail.com wrote: Chrome, Firefox and Safari all show a console error. They also all show the response. Puzzling... On Wednesday, January 16, 2013 5:22:36 PM UTC-5, Shane McCarron wrote: are you using Chrome by any chance? I noticed that it complains about some other headers I try to set in the same way. On Wed, Jan 16, 2013 at 4:21 PM, Dave Lazar hunk...@gmail.com wrote: As I mentioned... this a CORS setup, so obviously it is cross-site. That part of the stack works perfect, and the response is indeed dished out to the browser as expected. The only problem I have is Prototype not liking the header... I am looking for the tip that will silence that... Thanks On Wednesday, January 16, 2013 5:12:43 PM UTC-5, DaveK wrote: is the page served from http://test.heroku.com ? If not, it's a cross-site scripting security issue. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/** msg/prototype-scriptaculous/-/**xcPk0scKJdkJhttps://groups.google.com/d/msg/prototype-scriptaculous/-/xcPk0scKJdkJ . To post to this group, send email to prototype-s...@**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=enhttp://groups.google.com/group/prototype-scriptaculous?hl=en . -- Shane McCarron halin...@gmail.com -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/LOcfGBnKHXgJ. 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?hl=en.
Re: [Proto-Scripty] Ajax CORS error message
did you also set the headers in the Ajax.Request object to null ie new Ajax.Request('/your/url',{ 'requestHeaders' : { 'X-Requested-With' : null, 'X-Prototype-Version' : null}}); Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jan 16, 2013 at 5:42 PM, Dave Lazar hunkyb...@gmail.com wrote: I built that version of Prototype, with that pull request... and it did not fix that issue... sigh... since the actual CORS call works.. I will just ignore the browser errors Prototype is throwing... messes things up in the console.. but that is minor... Thanks On Wednesday, January 16, 2013 7:13:50 PM UTC-5, Jason wrote: In the latest DEV version hosted on github you can remove the X-* HTTP headers that PrototypeJS puts into the AJAX requests that make the CORS pre-flight requests fail. Check out this pull request https://github.com/**sstephenson/prototype/pull/88https://github.com/sstephenson/prototype/pull/88 Jason Westbrook | T: 313-799-3770 | jwest...@gmail.com On Wed, Jan 16, 2013 at 2:43 PM, Dave Lazar hunk...@gmail.com wrote: Chrome, Firefox and Safari all show a console error. They also all show the response. Puzzling... On Wednesday, January 16, 2013 5:22:36 PM UTC-5, Shane McCarron wrote: are you using Chrome by any chance? I noticed that it complains about some other headers I try to set in the same way. On Wed, Jan 16, 2013 at 4:21 PM, Dave Lazar hunk...@gmail.com wrote: As I mentioned... this a CORS setup, so obviously it is cross-site. That part of the stack works perfect, and the response is indeed dished out to the browser as expected. The only problem I have is Prototype not liking the header... I am looking for the tip that will silence that... Thanks On Wednesday, January 16, 2013 5:12:43 PM UTC-5, DaveK wrote: is the page served from http://test.heroku.com ? If not, it's a cross-site scripting security issue. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/* *ms**g/prototype-scriptaculous/-/**xc**Pk0scKJdkJhttps://groups.google.com/d/msg/prototype-scriptaculous/-/xcPk0scKJdkJ . To post to this group, send email to prototype-s...@**googlegroups.** com. To unsubscribe from this group, send email to prototype-scriptaculous+ **unsubs**cr...@googlegroups.com. For more options, visit this group at http://groups.google.com/**group **/prototype-scriptaculous?**hl=enhttp://groups.google.com/group/prototype-scriptaculous?hl=en **. -- Shane McCarron halin...@gmail.com -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/** msg/prototype-scriptaculous/-/**LOcfGBnKHXgJhttps://groups.google.com/d/msg/prototype-scriptaculous/-/LOcfGBnKHXgJ . To post to this group, send email to prototype-s...@**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=enhttp://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 view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/pcg4MZ0tctgJ. 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?hl=en.
Re: [Proto-Scripty] multipart/form-data upload via ajax
It is possible but you have to realize it will only work on browsers that have the FileAPI available - Chrome/Firefox/Safari new Ajax.Request(fileupload.php?filename=myfile,{postBody:$(inputfield).files[0]}); will post the contents of the file to fileupload.php then you can use file_get_contents(php://input); to get the contents of the file and the filename will be $_GET['filename'] Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jan 9, 2013 at 12:27 PM, fntzr fantaz...@gmail.com wrote: It not possible, use Flash Uploader for it, for example http://demo.swfupload.org/**v220/simpledemo/index.phphttp://demo.swfupload.org/v220/simpledemo/index.php . But with HTML5\xhr2 it will be possible. http://dev.w3.org/2006/webapi/**FileAPI/#FileReader-interfacehttp://dev.w3.org/2006/webapi/FileAPI/#FileReader-interface. -- 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 prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+** unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/** group/prototype-scriptaculous?**hl=enhttp://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?hl=en.
Re: [Proto-Scripty] multipart/form-data upload via ajax
Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jan 9, 2013 at 12:55 PM, Walter Lee Davis wa...@wdstudio.comwrote: On Jan 9, 2013, at 3:45 PM, Jason Westbrook wrote: It is possible but you have to realize it will only work on browsers that have the FileAPI available - Chrome/Firefox/Safari new Ajax.Request(fileupload.php?filename=myfile,{postBody:$(inputfield).files[0]}); will post the contents of the file to fileupload.php then you can use file_get_contents(php://input); Note that this style of upload will not have the same security treatment by PHP as the $_FILES superglobal variable, and move_uploaded_file() and friends will not be active for it either. This can become an awful security hole if you aren't careful. Agreed to get the contents of the file and the filename will be $_GET['filename'] If you want to use the normal upload mechanism, you can use a keyhole iframe as the target in your form action to post your file contents normally, and a callback function in the window scope of the containing page to signal back your updates. It looks like Ajax, but it's really just a multipart form post. Walter Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jan 9, 2013 at 12:27 PM, fntzr fantaz...@gmail.com wrote: It not possible, use Flash Uploader for it, for example http://demo.swfupload.org/v220/simpledemo/index.php. But with HTML5\xhr2 it will be possible. http://dev.w3.org/2006/webapi/FileAPI/#FileReader-interface . -- 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?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?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?hl=en.
Re: [Proto-Scripty] Prototype Fade Code Not Working in IE10
Firstly I'm using IE 10 and the fade effect is working for me also I still see 1.6.0.3 prototype and 1.8.2 scriptaculous also I get a javascript error on this bit of code div !-- PHP should replace this image with the default image that should go in the portal when JS is turned off -- !-- Quotes are already included around the image source since it is necessary for the JS array created -- img id=ir_default src= style=cursor: pointer; cursor: hand; onclick = window.location = / !-- Show text if any -- /div in the img the onclick - window.location needs to be set to something - or take it out Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sat, Jan 5, 2013 at 11:20 AM, Alan Owen hermonscho...@gmail.com wrote: Hi! I apologize if i'm vague in my message as I'm not really a programmer. I am running a website at http://www.mariyalivchikova.com . The page here http://www.mariyalivchikova.com/russian/index2.php , the top banner is supposed to fade to a new image every 4 seconds. On IE 9 and all earlier versions of IE, Firefox, and other known browsers, it works fine. However, on IE 10, the fade effect doesn't work. The image changes, but without the fade. It will work if I fall back to compatibility view, but I'm hoping to avoid this just so the code is natively compatible with the newer IE. I am quite certain the code is using prototype to support the image fading. I upgraded to the latest prototype, version 1.7.1 knowing that there's code changes that's supposed to make this effect work in IE 10. I went ahead and upgraded the latest scriptaculous as well. I did find the steps on this page ( https://prototype.lighthouseapp.com/projects/8886-prototype/tickets/1278-ie-detection-and-opacity ) , but the lines they reference aren't the same and even when I found the lines and applied the revision, it made no difference. I'm guessing that the newer version I applied of prototype does fix the issue, but I may need to revise the code on my page to utilize the feature. Can anyone help me identify why the fade effect does not work in IE10? Thank you! Alan Owen -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/AiA5KVabvJwJ. 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?hl=en.
Re: [Proto-Scripty] Re: Future of Prototyp.js
I was able to dig this one out of archive.org and I rewrote it a bit - added a jsfiddle so that people can play with it etc https://github.com/jwestbrook/Prototype.3DImageReflection Just look at all of my github repos - they are all PrototypeJS libraries Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Dec 30, 2012 at 4:22 PM, Phil Petree phil.pet...@gmail.com wrote: Amen... that would definately be a good move! There are a number of things on scripteka that are dead and gone (broken links) On Sun, Dec 30, 2012 at 5:37 PM, Victor vkhomyac...@gmail.com wrote: I'm actually planning on taking whatever is still available on scripteka and rehosting it on github so that others can find it, see examples of it working, post issues and comment on the scripts Good idea! Do you have something to show already? Examples and issue tracking sounds good. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/OvY44Z4adecJ. 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?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?hl=en.
Re: [Proto-Scripty] find parent element
Actually the observer is not attached to sub1 and sub2 - but the event from those elements is bubbling up to the parent li and the event is firing. try this - instead of attaching to the li parent try attaching to the a href and add an ID attribute to it snip... lia href=# id=helpinkspanHelp/span/a ul lia href=# role=menuitemspansub1/span/a/li lia href=# role=menuitemspansub2/span/a/li /ul /li snip... then the javascript becomes $('helplink').observe(mouseover,respondTo); if you have multiple helplinks you can turn it into a class like so lia href=# class=helpinkspanHelp/span/a ul lia href=# role=menuitemspansub1/span/a/li lia href=# role=menuitemspansub2/span/a/li /ul /li then the javascript is $$(.helplink).invoke(observe,mouseover,respondTo); The invoke() method will iterate over the array that is returned and do the specified method on those items Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Dec 16, 2012 at 9:45 AM, Laurent Barre houpde...@gmail.com wrote: Hi, I have : nav id=navigation role=navigation ul id=menu role=menubar li title=Hello World!a href=#spanHome/span/a/li li attr=parenta href=#spanHelp/span/a ul lia href=# role=menuitemspansub1/span/a/li lia href=# role=menuitemspansub2/span/a/li /ul /li /nav $$('[attr=parent]').each(function (elt) { Event.observe(elt,'mouseover',respondTo); }); function respondTo() { trace('ok'); } My problem is that sub1, sub2 are link to event.observe. I'd like to have only help who will link with event.observe. How do I do for separate the parent and children element ? Best regard. -- 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?hl=en.
Re: [Proto-Scripty] Disable keyup event on CTRL+ click
This might help http://www.w3schools.com/jsref/event_ctrlkey.asp Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Thu, Dec 13, 2012 at 11:43 AM, kstubs kst...@gmail.com wrote: Does anyone know how to disable or stop and bound keyup event method when the CTRL key is depressed? Right now my page responds to the keyup event and then filters the page by that character. Well, if a user has made a selection on the page, like they are going to copy a name from the page, and they click CTRL+C, the keyup event fires and the page is filtered with the character C. Thanks for any tips on the matter. Karl.. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/CtP6XCjM9kEJ. 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?hl=en.
Re: [Proto-Scripty] Google+ Group Created
Also its a great way to show that prototypejs has an active community and members that are willing to help coders that are new to prototype Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Dec 14, 2012 at 9:55 AM, Joseph Spandrusyszyn illand...@illandril.net wrote: You can turn notifications on for Google+ communities if you want notifications. Those who don't want notifications, but want to look occasionally could join and not turn on notifications. Although having the community set so that you need to ask to join will limit participation. - Joe On Fri, Dec 14, 2012 at 12:45 PM, Walter Lee Davis wa...@wdstudio.comwrote: On Dec 14, 2012, at 12:16 PM, kstubs wrote: Any Google+ users on this forum? I've started a community there called PrototypeJS. https://plus.google.com/u/0/communities/117299565971807136426 Come join! Serious question: what would the benefit be versus mail? How would you receive notification of new messages? Would you have to keep reloading the page? 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. -- 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?hl=en.
Re: [Proto-Scripty] Help sizzle select
Try it this way $('logins').select('li.seaside').invoke('show'); or $('logins').select('li.fav').invoke('show'); or with the variable $('logins').select('li.'+group).invoke('show'); if you use the attribute selector instead of a class selector it will interpret it very literally instead of this is what I meant Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Dec 14, 2012 at 1:10 PM, kstubs kst...@gmail.com wrote: I have this $('logins').select('li[class=\'' + group + '\']').invoke('show'); This seems to be matching on an exact class name though, but I have something like li class=seaside favSeaside/li So if group is fav or group is seaside, then either should return the above. Thanks for the help. Karl.. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/R_8NmGQ1sdAJ. 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?hl=en.
Re: [Proto-Scripty] Return in Ajax.Request, I don't know how to do it
Firstly the javascript you have posted seems to be incorrect - the blocks of code have mismatched {} , ie onException: is not part of the options object literal passed to Ajax.Request - but that might have been copy and pasting problems - have you confirmed that the ajax response has the a Content-Type: application/json header? - if so have you tried to console.log the xhr.ResponseText - the JSON might be invalid? - onsuccess should be onSuccess - you are doing a strictly equal test (===), you might consider just checking equal (==) first get it working and then check strict equal and to answer your main question - the onSuccess is a callback function - returning a value is not really something to be done for a callback function - you can set/get other global variables and you should be able to access the variables in the method you have written Let me know if anything doesn't make sense Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Dec 9, 2012 at 3:40 PM, Laurent Barre houpde...@gmail.com wrote: Hi, I have a function : request:function (object) { var chaine = var param = {; for (var i = 0; i object.param.length; i++) { chaine = chaine + param_ + i + : + object.param[i] + , } chaine = chaine.substr(0, (chaine.length - 1)); chaine = chaine + };; eval(chaine); new Ajax.Request(object.php, { method:object.method, encoding:'UTF-8', contentType:'application/x-www-form-urlencoded', parameters:param, onsucess:function (xhr, json) { if (json[0].etat === A) { result.etat = 'A'; result.message = json[0].msg; /* test 2 */ return {result:result}; alert('ok'); } else if (json[0].etat === S) { result.etat = 'S'; result.message = json[0].msg; } } }, onException:function (xhr, e) { alert('Exception : ' + e); }}); alert(result.etat); return {result:result}; } first test : if I test, everything works, I have alert(ok), but alert(result.etat) is empty. second test : with test 2 active, return doesn't work. I think that Ajax.Request doesn't exchange the parameters between ajax.request and my request function. But I don't know how to link them ? Best regards. -- 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?hl=en.
Re: [Proto-Scripty] Re: Future of Prototyp.js
I'm actually planning on taking whatever is still available on scripteka and rehosting it on github so that others can find it, see examples of it working, post issues and comment on the scripts Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sat, Dec 1, 2012 at 7:21 AM, kstubs kst...@gmail.com wrote: ..and related to all of this is a site like this: http://scripteka.com Where a ton of the script that use to be available, well the underlying/host site for the code have dropped off the WWW universe. Very sad :( A lot of broken links. Karl.. On Saturday, December 1, 2012 6:54:42 AM UTC-7, isurge wrote: We let our IE 6 clients go. On 12/1/12 1:48 AM, petrob wrote: I understood why a lot of companies still insist on using IE6 when at a large hypermarket chain the accounting staff pointed out that their very expensive accounting software can only be run on IE6 or on IE9+. The cost efficient solution for them is to go on running their legal copies of XP on some hundreds of computers with IE6 and ban any acive-x objects and script (java, javascript, flash etc) on the company server. So, it is the operating system that is behind the longevity of IE in the corporate field and , unfortunately, it will remain the same for a long time. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/**msg/prototype-scriptaculous/-/** --r_rxEpnswJhttps://groups.google.com/d/msg/prototype-scriptaculous/-/--r_rxEpnswJ. To post to this group, send email to prototype-s...@**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=enhttp://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 view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/mmHzcI7zWxMJ. 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?hl=en.
[Proto-Scripty] prototypejs.org is down
Hey all can someone get a message to the devs that prototypejs.org is down - the API is still up though Thanks! -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/3bNTjheKjCAJ. 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.
Re: [Proto-Scripty] Add element but it's a group of elements
$('test').insert(a); // will try and add that content as the content of that input (which you don't want) $('test').insert({after:a}); //will insert that content AFTER the specified element Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Nov 9, 2012 at 3:15 PM, Laurent Barre houpde...@gmail.com wrote: it's good. I can add the element in the body. Now, I tried to add this element under input element. example : input id='test' . div id=span_titre class=reqformError parentFormformID formError style=opacity: 0.87;margin-left:245px;margin-top:7px;div class=formErrorArrow formErrorArrowBottomdiv class=line1!-- --/divdiv class=line2!-- --/divdiv class=line3!-- --/divdiv class=line4!-- --/divdiv class=line5!-- --/divdiv class=line6!-- --/divdiv class=line7!-- --/divdiv class=line8!-- --/divdiv class=line9!-- --/divdiv class=line10!-- --/div/divdiv class=formErrorContent Vous devez saisir une valeurbr/div/div with : $('test').insert(a); but element a is not visible. apparently element input isn't considered as an element. do you have a method to locate input element ? 2012/11/9 fntzr fantaz...@gmail.com Use var a = ' div id=span_titre class=reqformError parentFormformID formError style=opacity: 0.87;margin-left:245px;margin-top:7px;div class=formErrorArrow formErrorArrowBottomdiv class=line1!-- --/divdiv class=line2!-- --/divdiv class=line3!-- --/divdiv class=line4!-- --/divdiv class=line5!-- --/divdiv class=line6!-- --/divdiv class=line7!-- --/divdiv class=line8!-- --/divdiv class=line9!-- --/divdiv class=line10!-- --/div/divdiv class=formErrorContent Vous devez saisir une valeurbr/div/div'; $(document.body).insert(a); -- 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?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?hl=en.
Re: [Proto-Scripty] Toggle
Can you provide a code snippet, jsfiddle or a publicy viewable page? also make sure that the CSS is not setting the display:none on that element as Prototype/Scriptaculous will not override the display style Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Tue, Nov 6, 2012 at 11:39 AM, Tom i...@butt-on-merch.de wrote: Hello, i want to use the toggle SUDE slide effect. is it possible that the area/text i want to slide (down), is not visible when the page is loaded? i want the area visible with a click on a text, and hide with a new click at the text... Thank you -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/Sjz-rHxEFC8J. 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?hl=en.
Re: [Proto-Scripty] Hi, new to group. Having an issue with visible() method. any suggestions?
If $(id) returns null (like in this instance) then the id does not exist on the page This might be handled better using a class on each of the panels and simply holding which is the open/minimized index that way you don't have to worry about what ids exist Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Oct 15, 2012 at 11:15 AM, Peter Sysko petersy...@gmail.com wrote: I love prototype and scriptacualous. I don't combine with jquery so i know i am not having a noclonflict headache, and I am just trying to get the visible() function ( http://prototypejs.org/api/element/visible) to not throw null type error exceptions: here is the function I need to fix, syntactically: the function creates an associative array to track which of 33 system panels are either open, unopen, or minimized*: **(the systems are indexed from 100 to 132)* function get_system_states() { var k=0; var sys_array = new Array(); var open_div=''; var min_div=''; for(k=100;k132;k++){ open_div = 'system'+k+''; min_div = open_div+'_minimized'; if ($(open_div).visible()==true) { sys_array[k] = o; // o = open } if ($(min_div).visible()==true) { sys_array[k] = m; // m = minimized } if (($(open_div).visible()==false)($(min_div).visible()==false)) { sys_array[k] = c;// u = unopen } } return sys_array; } Javscript console error says : 1. Uncaught TypeError: Cannot call method 'visible' of null 1. the first IF statement in the for loop is throwing the exception, but I assume I am not assigning the div values correctly? i have found no answers in this group from a text search and from a general google search. is this a single quotation reference? my div id's are dynamically written in php codeignite, which shouldnt really matter. any suggestions for how to properly get the visibility of each div in each current state? thanks!! -pete -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/s8MPSAK2FwMJ. 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?hl=en.
Re: [Proto-Scripty] Re: Hi, new to group. Having an issue with visible() method. any suggestions?
I've never had a problem with putting variables into the $() function but I do have a suggestion for keeping your open/minimized/closed panels straight try declaring a global array or hash and using that as the status variable - all the javascript functions can use it natively and you don't have to do the expensive splitting every time you want to know what panels are open example var panels = new Hash({system100 : M, system101:U}); //etc //then panels.get(system+id); //or panels.set(system+id,U); you can even initialize it easily for(var t = 100 ; t = 132 ; t++) { panels.set(system+t,U); } Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Oct 15, 2012 at 4:32 PM, Peter Sysko petersy...@gmail.com wrote: Thanks for the suggestion, Jason. Most people don't run into this problem because they do not deal with dynamically assigned div ids from javascript variables. I found for what i am doing it was the most efficient way to go about referencing the divs. otherwise, switch statements with 33 cases would have to do, and that was pretty intensive. It does appear that the $(element) wrapper doesn't play nice at all with javascript variables, you actually have to put the quotes exactly as they appear on the div. (unless I am still doing it wrong).. i tried .toString functions, parseInt's, double quotes, single quotes, with and without the $wrapers, etc.. and finally I looked into the prototype.js script and the visible method is really simple, just checks if the display: property of the style attribute is set to none and returns a boolean value, so the workaround is to get the element with the document.getElementbyID (which*does *work fine with javasscript variable as the ID), and do the conditional statement custom. In the process of researching this bug I made a series of alternative functions as a different way to skin the cat. Currently they keep track of which systems are closed, minimized or unopen with some innerHTML in a hidden div that references the index (100-133) with the letter U, M or O, then rewrites the entire string when it changes. the initial div looks like this: (all systems unopened): div id=mb_system_state_references style=display:none;100=U:101=U:102=U:103=U:104=U:105=U:106=U:107=U:108=U:109=U:110=U:111=U:112=U:113=U:114=U:115=U:116=U:117=U:118=U:119=U:120=U:121=U:122=U:123=U:124=U:125=U:126=U:127=U:128=U:129=U:130=U:131=U:132=U/div I have got half of the functions working, you can see what I am working on here: http://monkeypanel.com/demo -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/OHJUzayk4UAJ. 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?hl=en.
Re: [Proto-Scripty] Re: Hi, new to group. Having an issue with visible() method. any suggestions?
to be clear - the example I put is not a javascript array but a Prototype Hash you should be able to do the same thing with a javascript array though Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Oct 15, 2012 at 5:25 PM, Peter Sysko petersy...@gmail.com wrote: whoa i had no idea you could do that with javascript array. i just didn't think the data persistence was possible, even if the window was still open. but it makes perfect sense, and much simpler than what i'm doing now. I will have to give it a shot tomorrow, thank you! On Monday, October 15, 2012 2:15:23 PM UTC-4, Peter Sysko wrote: I love prototype and scriptacualous. I don't combine with jquery so i know i am not having a noclonflict headache, and I am just trying to get the visible() function ( http://prototypejs.org/api/**element/visiblehttp://prototypejs.org/api/element/visible ) to not throw null type error exceptions: here is the function I need to fix, syntactically: the function creates an associative array to track which of 33 system panels are either open, unopen, or minimized*: **(the systems are indexed from 100 to 132)* function get_system_states() { var k=0; var sys_array = new Array(); var open_div=''; var min_div=''; for(k=100;k132;k++){ open_div = 'system'+k+''; min_div = open_div+'_minimized'; if ($(open_div).visible()==true) { sys_array[k] = o; // o = open } if ($(min_div).visible()==true) { sys_array[k] = m; // m = minimized } if (($(open_div).visible()==**false)($(min_div).visible()=**=false)) { sys_array[k] = c;// u = unopen } } return sys_array; } Javscript console error says : 1. Uncaught TypeError: Cannot call method 'visible' of null 1. the first IF statement in the for loop is throwing the exception, but I assume I am not assigning the div values correctly? i have found no answers in this group from a text search and from a general google search. is this a single quotation reference? my div id's are dynamically written in php codeignite, which shouldnt really matter. any suggestions for how to properly get the visibility of each div in each current state? thanks!! -pete -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/dodF3TNhKR0J. 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?hl=en.
Re: [Proto-Scripty] Form submit bubble
my interpretation of the documentation is as follows if that is inside a class then you might have to use bind to make sure that this still refers to your class instance - vs this would refer to the element the event was fired on Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Sep 26, 2012 at 1:30 PM, kstubs kst...@gmail.com wrote: OK, I have something like this: this.zz__handleCommentFormSubmit = this.comment_form.on('submit', this.__handleCommentFormSubmit); It is unclear to me, reading from the API, if I must bind or bindAsEventListener or leave it as it, the method: this.__handleCommentFormSubmit, in the above statement. Karl.. FYI.. this refers to my class. On Wednesday, September 26, 2012 12:08:31 PM UTC-7, kstubs wrote: OK, I understand what needs to be done, I just need to bind the form submit each time it is created and then destroy it, the form and the handler. Thanks, Karl.. On Wednesday, September 26, 2012 10:16:30 AM UTC-7, Jason wrote: my suggestion is to setup a function as the event handler and on form creation add the submit observe - also if you are worried about memory leaks remove all the child elements of the container on new form creation ie function handle_submit( event) { // handle submit action } $(container).childElements()**.invoke(remove); var form = new Element(form); form.observe(submit,handle_**submit); // add more elements to the form $(container).update(form); Jason Westbrook | T: 313-799-3770 | jwest...@gmail.com On Wed, Sep 26, 2012 at 6:24 AM, Walter Lee Davis wa...@wdstudio.comwrote: On Sep 26, 2012, at 5:00 AM, kstubs wrote: Does a form submit bubble up to the containing element? I'd like to capture form submit on a container div for a form submit. Reason being: I create the form on the fly based on whichever child element the user has selected (if any). I'd like to add a form submit handler to the container, much like I do for click events, to handle and setup the form submission one time. I'm not sure if it does in every browser. You may be able to simulate this with synthetic events, using fire() on the form to send out the broadcast, and observe() on the DIV to receive. 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-s...@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=enhttp://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 view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/zJ7lmI3W-5UJ. 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?hl=en.
Re: [Proto-Scripty] Re: Prototype's selector as well as eq in Jquery
nth-child doesnt work in Internet Explorer CSS - can Prototype correctly decode that in IE? Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Sep 24, 2012 at 9:55 AM, Victor vkhomyac...@gmail.com wrote: $(#table-id td:nth-child(2)) will select 2nd cells in all rows of table with id table-id -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/1lO-8ck8qY4J. 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?hl=en.
Re: [Proto-Scripty] Prototype's selector as well as eq in Jquery
You could probably also use $$('td .yui-dt-liner div[id^=yui-gen]')[2].setStyle('width:122px'); for individual calls - but if you are going through multiple elements I would use each as Walter described Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Sep 23, 2012 at 3:19 PM, Walter Lee Davis wa...@wdstudio.comwrote: Sure. if you start at the tr that holds the tds, you can use down() to do this. If you want the second td to have a certain width, you could do this: $$('tr').each(function(elm){ elm.down('td', 2).setStyle('width:122px'); }); Walter On Sep 23, 2012, at 12:59 PM, Евгений Шморгун wrote: I have to assign the different sizes to the td, and the width of them depends on the number's position of the tag in table. In Jquery I can write $$('td .yui-dt-liner div[id^=yui-gen]').eq(2).invoke(setStyle,{'width':'122px'}); changing the argument in eq. is there analogue expression in prototype.js ? Thanks! -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/rjXTGT4Eu94J. 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?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?hl=en.
Re: [Proto-Scripty] Any reason why this might not work?
I agree that some code is not always written like that - but I've had many instances where a javascript block would work in modern standards compliant browsers yet fail silently in IE until I put quotes in, single or double. Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Thu, Aug 9, 2012 at 2:34 AM, Victor vkhomyac...@gmail.com wrote: Internet explorer doesn't like object definitions without quotes around the names Hmm... example from Prototype 1.7 sources: Object.extend(methods, { getStorage: getStorage, store: store, retrieve: retrieve }); Quotes are required for properties matching reserved words (class etc.) or containing characters forbidden in identifiers (spaces, colons etc.), and browser name/version doesn't matter. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/VRlsqLkyyzMJ. 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?hl=en.
[Proto-Scripty] New Version of Prototype (1.7.1)
Hi All If you haven't noticed, the Prototype dev(s) have just released an update to 1.7.1 more details on the blog http://prototypejs.org/2012/8/8/prototype-1-7-1 Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/Ohjh2VWIcsMJ. 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.
Re: [Proto-Scripty] Any reason why this might not work?
Internet explorer doesn't like object definitions without quotes around the names if(typeof Element.store == 'undefined'){ Element.addMethods({ store: function(elm, k, v){ elm[k] = v; }, retrieve: function(elm, k){ return (elm[k]); } }); } Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Tue, Aug 7, 2012 at 11:29 AM, Walter Lee Davis wa...@wdstudio.comwrote: I have a function that might need to run under 1.6 or 1.7, but I don't want to branch my code horribly around store and retrieve. This seems to work: if(typeof Element.store == 'undefined'){ Element.addMethods({ store: function(elm, k, v){ elm[k] = v; }, retrieve: function(elm, k){ return (elm[k]); } }); } Can anyone spot any reason why it might fail horribly in some browser? 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. -- 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.
Re: [Proto-Scripty] Re: run function with AJAX.Updater
I think I know what is going on in the first example - everything runs as normal and nothing happens because you are just declaring a function in the external script - the function is not called - plus getLottoNumber() is not defined the second example you are requesting a javascript file - but are sending a html snippet, script blocks are not in js files my opinion is you can clean this up alot by moving the function to the same page and using more of the prototype utilities I put a jsfiddle with my changes together for you - I changed out the getLottoNumber() with random number so that it would work - let me know if this makes sense http://jsfiddle.net/FPBkA/ Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Jul 27, 2012 at 7:46 AM, Phil Petree phil.pet...@gmail.com wrote: then perhaps we're not understanding what you mean by passed normal process is: onSuccess: call a function that processes the incoming data onFailure: tell the user what happened what gets passed is data. what gets called are functions. having code in an external file indicates to me you want to call a function. I think a little more clarity might help us help you. On Fri, Jul 27, 2012 at 10:21 AM, Jim Longo jimlong...@gmail.com wrote: Thanks for your response. I'm sorry, I forgot to mention I had tried that. The request is successful (as I mentioned I can pass html and php, just not javascript) On Friday, July 27, 2012 7:35:11 AM UTC-4, ppetree wrote: Try using the onsuccess on failure parameters in Ajax updater. onFailure: function() {alert(bombed);}, onSuccess: ... On Jul 27, 2012 12:04 AM, Jim Longo wrote: If it helps, I can replace the js with something real simple (an alert) and it still won't run in the AJAX page. If I put plain text or html or php in the external file it will run, but not javascript. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/3bfU0S4hsnQJ. 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?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?hl=en.
Re: [Proto-Scripty] Re: run function with AJAX.Updater
Phil setting the content of an element via the innerHTML property was deprecated for the $(elmentid).update(content) function. Or by using the $(elmentid).insert(content) function if appropriate. Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Jul 27, 2012 at 1:19 PM, Phil Petree phil.pet...@gmail.com wrote: Jim, I shoulda put this in my last email... Here are two ways to set the individual fields using prototype: $('my_div').innerHTML = szUpdate; $('my_form_field').value='what I want the value to be'; function success_function(transport) { var json = transport.responseText.evalJSON(true); // php would return: // $options = Array('status' = OK, 'text' = OK); // $output = json_encode($options); // echo $output; // it's the status in the Array we're checking... if(json.status == OK) { // do stuff $(activeButton).replace('font color=greenSubscribed'); $('my_div').innerHTML = h1AJAX Response/h1p +json.text +/p; } } On Fri, Jul 27, 2012 at 4:05 PM, Phil Petree phil.pet...@gmail.comwrote: Jim, Did Jason's code not work? And you're right, the examples and docs totally suck... it's like trying to decipher some secret code that someone forgot to let the rest of us normal programmers in on. The purpose of AJAX calls is to reduce bandwidth and server hits by reducing the number of page hits. It's easier, cheaper, faster to just send the data the user needs vs the entire page. Prototype has two functions for Ajax calls: Ajax.Updater and Ajax.Request. I stopped using Ajax.Updater for anything other than single element updates. Breaking down an Ajax.Request call for you it would look something like this: var options = { method: 'post', parameters: $('myform').serialize(), onSuccess: success_function, onFailure: ajax_err, on0: ajax_err }; new Ajax.Request( url+.php, options ); function success_function(transport) { var json = transport.responseText.evalJSON(true); // php would return: // $options = Array('status' = OK, 'text' = OK); // $output = json_encode($options); // echo $output; // it's the status in the Array we're checking... if(json.status == OK) { // do stuff $(activeButton).replace('font color=greenSubscribed'); } } function ajax_err(transport) { alert(An AJAX error occurred: +transport.statusText); } On Fri, Jul 27, 2012 at 3:40 PM, Jim Longo jimlong...@gmail.com wrote: Thanks Phil, I do want to call a javascript function. But let me try to simplify my problem. Here is a page . . . div id=myDiv/div script type=text/javascript new Ajax.Updater('myDiv', 'XYZ.html', {evalScripts: true}) ; /script Here is the page being called . . . script type=text/javascript sayHi = function(){ alert ('Hi'); }; /script input type=button value=Click Me onclick=sayHi()/ This will work, in the sense that myDiv will remain and the alert will display. My problem is that if I replace *alert* with *document.write* then the page gets replaced with a new page. I thought the idea behind AJAX.Updater was to replace the DIV with new data, or in this case the result of the function. *So in my newbie logic the DIV should get replaced with the text generated by document.write.? * I have tried to figure what you mean by using onSuccess, but I fail to get the right syntax, and it's very hard to find in the docs. I assume you mean to call the function as part of the onSuccess parameters. However the example above does seem to execute the function from called page, it's just that it works with alert but not document.write and this is doesn't make sense to me (yet). On Friday, July 27, 2012 10:46:33 AM UTC-4, ppetree wrote: then perhaps we're not understanding what you mean by passed normal process is: onSuccess: call a function that processes the incoming data onFailure: tell the user what happened what gets passed is data. what gets called are functions. having code in an external file indicates to me you want to call a function. I think a little more clarity might help us help you. On Fri, Jul 27, 2012 at 10:21 AM, Jim Longo wrote: Thanks for your response. I'm sorry, I forgot to mention I had tried that. The request is successful (as I mentioned I can pass html and php, just not javascript) On Friday, July 27, 2012 7:35:11 AM UTC-4, ppetree wrote: Try using the onsuccess on failure parameters in Ajax updater. onFailure: function() {alert(bombed);}, onSuccess: ... On Jul 27, 2012 12:04 AM, Jim Longo wrote: If it helps, I can replace the js with something real simple (an alert) and it still won't run in the AJAX page. If I put plain text or html or php in the external file it will run, but not javascript. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https
Re: [Proto-Scripty] Confirm() happening twice on click.
can you either post the HTML that you are using or post the url where it is located publicly? you can simplify your javascript this way $$('td a.delete').each(function(s){ s.observe('click', confirmDelete); } ); Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jul 11, 2012 at 9:26 AM, thinsoldier thinsold...@gmail.com wrote: Hello. I have a page that lists records and each row has a link that goes to a page which deletes the associated record. But before the browser navigates to that page I stop it by asking the user if they really want to delete the item. If they click cancel the browser goes nowhere. If they click OK the browser navigates to the php file that deletes the record. My problem is that after the confirm() UI appears and is clicked, it appears AGAIN, then when I click again does the expected behaviour occur. What is causing that in this code? document.observe(dom:loaded, function() { // attach to all delete links in the table var dels = $$('td a.delete'); dels.each(function(s){ s.observe('click', function(event){ confirmDelete(event); } ); } ) }); function confirmDelete(event) { var ask = confirm('Are you sure you want to delete this entry?'); if(ask){ xfoo = 'follow link - delete it'; } else{ event.stop(); xfoo =' do nothing - stop event '; } } -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/qwdMPG_i8WMJ. 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?hl=en.
Re: [Proto-Scripty] Confirm() happening twice on click.
I don't see any problems with the HTML elements and to answer your question the observe method identifies the function as the handler and passes the event object to the handler and you can get the javascript to one line if you want $$(td a.delete).invoke(observe,click,confirmDelete); Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jul 11, 2012 at 10:40 AM, thinsoldier thinsold...@thinsoldier.comwrote: On Wednesday, 11 July 2012 12:37:45 UTC-4, Jason wrote: can you either post the HTML that you are using or post the url where it is located publicly? Here is the html: table thead tr thSaved/th thName/th thRename/th thDelete/th thSwitch Format/th thBrowse/th /tr /thead tbody tr td 11 Nov, 2009 /td td a class=rsslink href=savedsearches.php?cmd=rssamp;ssid=39 title=Access RSS Feed img src=/images/icons/rss_16.png Sale less than x 250 thousand /a /td td a class=rename href=user.php?cmd=savedSearchRenameFormamp;id=39Rename/a /td td a class=delete href=user.php?cmd=savedSearchDeleteamp;id=39 title=Cannot undo.img src=/images/icons/close_32.png alt=delete/a /td td a class=reformat href=user.php?cmd=savedSearchSwitchFormatamp;id=39 title=Receive this by e-mail instead. img src=/images/icons/rss_32.png img src=/images/icons/arrow_right_16.png img src=/images/icons/email_32.png /a /td td a class=browse href=search.php?cmd=searchamp;formcat=residentialamp;searchType=BUYSEARCHamp;searchOnPriceField=priceamp;island=252amp;maxprice=25img src=/images/icons/search_32.png alt=view results/a /td /tr tr td 25 Jun, 2012 /td td a class=rsslink href=savedsearches.php?cmd=rssamp;ssid=77 title=Access RSS Feed img src=/images/icons/rss_16.png All the -plexes in NP /a /td td a class=rename href=user.php?cmd=savedSearchRenameFormamp;id=77Rename/a /td td a class=delete href=user.php?cmd=savedSearchDeleteamp;id=77 title=Cannot undo.img src=/images/icons/close_32.png alt=delete/a /td td a class=reformat href=user.php?cmd=savedSearchSwitchFormatamp;id=77 title=Receive this by e-mail instead. img src=/images/icons/rss_32.png img src=/images/icons/arrow_right_16.png img src=/images/icons/email_32.png /a /td td a class=browse href=search.php?cmd=searchamp;formcat=residentialamp;searchType=BUYSEARCHamp;searchOnPriceField=priceamp;island=410amp;property_type%5B0%5D=655amp;property_type%5B1%5D=656amp;property_type%5B2%5D=657amp;property_type%5B3%5D=695img src=/images/icons/search_32.png alt=view results/a /td /tr /tbody /table you can simplify your javascript this way $$('td a.delete').each(function(s){ s.observe('click', **confirmDelete); } ); But wouldn't the confirmDelete function need to be given the click event so it knows which click Event object to event.*stop*() ? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/u_tbuSa5zEcJ. 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?hl=en.
Re: [Proto-Scripty] Confirm() happening twice on click.
Honestly I'm not exactly sure there is a possibility that the observe method was calling confirmDelete instead of just tagging it as the event handler Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jul 11, 2012 at 12:06 PM, thinsoldier thinsold...@thinsoldier.comwrote: Thanks for all your help. Thing thing has been buggin me for a very long! Could you explain what exactly was happening with my original code that made the confirm fire twice? On Wednesday, 11 July 2012 14:13:13 UTC-4, Jason wrote: I don't see any problems with the HTML elements and to answer your question the observe method identifies the function as the handler and passes the event object to the handler and you can get the javascript to one line if you want $$(td a.delete).invoke(observe,**click,confirmDelete); Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, Jul 11, 2012 at 10:40 AM, thinsoldier thinsold...@thinsoldier.com wrote: On Wednesday, 11 July 2012 12:37:45 UTC-4, Jason wrote: can you either post the HTML that you are using or post the url where it is located publicly? Here is the html: table thead tr thSaved/th thName/th thRename/th thDelete/th thSwitch Format/th thBrowse/th /tr /thead tbody tr td 11 Nov, 2009 /td td a class=rsslink href=savedsearches.php?cmd=**rssamp;ssid=39 title=Access RSS Feed img src=/images/icons/rss_16.png** Sale less than x 250 thousand /a /td td a class=rename href=user.php?cmd=**savedSearchRenameFormamp;id= **39Rename/a /td td a class=delete href=user.php?cmd=**savedSearchDeleteamp;id=39 title=Cannot undo.img src=/images/icons/close_32.**png alt=delete/a /td td a class=reformat href=user.php?cmd=** savedSearchSwitchFormatamp;**id=39 title=Receive this by e-mail instead. img src=/images/icons/rss_32.png** img src=/images/icons/arrow_**right_16.png img src=/images/icons/email_32.**png /a /td td a class=browse href=search.php?cmd=search** amp;formcat=residentialamp;**searchType=BUYSEARCHamp;** searchOnPriceField=priceamp;**island=252amp;maxprice=**25img src=/images/icons/search_32.**png alt=view results/a /td /tr tr td 25 Jun, 2012 /td td a class=rsslink href=savedsearches.php?cmd=**rssamp;ssid=77 title=Access RSS Feed img src=/images/icons/rss_16.png** All the -plexes in NP /a /td td a class=rename href=user.php?cmd=**savedSearchRenameFormamp;id= **77Rename/a /td td a class=delete href=user.php?cmd=**savedSearchDeleteamp;id=77 title=Cannot undo.img src=/images/icons/close_32.**png alt=delete/a /td td a class=reformat href=user.php?cmd=** savedSearchSwitchFormatamp;**id=77 title=Receive this by e-mail instead. img src=/images/icons/rss_32.png** img src=/images/icons/arrow_**right_16.png img src=/images/icons/email_32.**png /a /td td a class=browse href=search.php?cmd=search** amp;formcat=residentialamp;**searchType=BUYSEARCHamp;** searchOnPriceField=priceamp;**island=410amp;property_type%** 5B0%5D=655amp;property_type%**5B1%5D=656amp;property_type%** 5B2%5D=657amp;property_type%**5B3%5D=695img src=/images/icons/search_32.**png alt=view results/a /td /tr /tbody /table you can simplify your javascript this way $$('td a.delete').each(function(s){ s.observe('click', **confirmDele**te); } ); But wouldn't the confirmDelete function need to be given the click event so it knows which click Event object to event.*stop*() ? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/** msg/prototype-scriptaculous/-/**u_tbuSa5zEcJhttps://groups.google.com/d/msg/prototype-scriptaculous/-/u_tbuSa5zEcJ . To post to this group, send email to prototype-scriptaculous@** googlegroups.com prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+** unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/** group/prototype-scriptaculous?**hl=enhttp://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 view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/wwHOXznXcpYJ. 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
Re: [Proto-Scripty] local autocompleter and event.observe
I have a solution for you but it involves a few changes you can define an option in the Autocompleter.local initialization called afterUpdateElement - this will fire the function you define in that option for example new Autocompleter.Local('field1', 'field1_list', source,{fullSearch:true,afterUpdateElement:foo2 }); foo2 is passed the DOM element that Autocompleter is tied to, in this instance field1 so if you change foo2 function foo2(field) { var val=field.value; alert(val);// 'jason' } it will alert the desired value - let me know if you have any questions Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Jul 2, 2012 at 9:55 AM, charles.desfor...@orange.fr charles.desfor...@orange.fr wrote: Hi I am new on prototype and scriptaculos then I have a basic problem I guess. I try to catch through a handler the value selected in a autocompleter.local list. I succeed to get the initial written characters but not the complete string. For example I write 'ja' into field then I select the 'jason' value listed I shall never get 'jason' only 'ja' but strange: if I use an alert() between two set instruction I get the right value then. Thank in advance for your answer CDesforges. Prototype v 1.7 Scriptaculos 1.9.0 on Fedora 11 x64 These are elements of code function foo(event) { var val=this.value; alert(val);// 'ja' var val=this.value; alert(val);// 'jason' } function foo2(event) { var val=this.value; alert(val);// 'ja' } var source=['json','jason']; new Autocompleter.Local('field1', 'field1_list', source, {fullSearch:true }); $('field1').observe('change', foo); -- 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?hl=en.
Re: [Proto-Scripty] Solved -- Re: Sortable with addtional droppable
FWIW there are still plenty of users that are still using Prototype Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Thu, Jun 14, 2012 at 1:04 PM, JJD johnjdev...@gmail.com wrote: Whoops. Sorry to waste your time... The error was in the onDrop callback, thumb_handler.delete_thumb, not the posted code. Carry on as before! On Thursday, June 14, 2012 3:53:22 PM UTC-4, JJD wrote: Yes, I'm still using prototype :) I have a list of thumbnails in a container, and a Sortable created for the container so I can reorder them. I also want to add a separate droppable outside the container div to accept imgs I want to trash. I can't figure out how to get the thumb to drop onto the trash outside of the thumb container. With the code below, the image won't drop until it's release over the original thumbs div. Anyone have any pointers? HTML (erb): div id=thumbs % @thumbs.each do |thumb| % img class=crop_img id=thumb_%=thumb.id% src=%=thumb.filename% / % end % /div div id=crop_trash style=display: block; width:100px;height:100px;** background-color:#CC Trash /div script type=text/javascript //![CDATA[ Sortable.new_create('thumbs', { format:/_(\d*)$/, onUpdate: function(){ new Ajax.Request('/the/url', {asynchronous: true, evalScripts: true}); }, only: 'crop_img', constraint: false, containment: ['thumbs','crop_trash'], tag: 'img' }); Droppables.add('crop_trash', { accept: 'crop_img', onDrop: function(drag){ thumb_handler.delete_thumb(**drag.id.substring(drag.id.** lastIndexOf('_')+1)); } } ); //]] /script -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/VDlwjumQ0uQJ. 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?hl=en.
Re: [Proto-Scripty] Please remove me from your mailing list.
Hi Suresh you can unsubscribe at any time by sending an email to prototype-scriptaculous-unsubscr...@googlegroups.com Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Mon, Jun 4, 2012 at 5:53 PM, suresh V R sur...@gmail.com wrote: Hi, Please remove me from your mailing list. -- 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?hl=en.
Re: [Proto-Scripty] IE8 error, line 5974 - Object doesn't support this property or method
Are you wanting to collect all of the child elements of $(element) ? try using $(element).childElements() but actually looking at the whole code it looks like you are defining getElementsByClassName - there is already functionality in prototype to do this $$(.classname) will return a list of elements with that classname in the entire DOM if you need to select all elements that are children of a certain node $(element).select(.classname) will do that Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Fri, Jun 8, 2012 at 12:51 AM, nbezzala nbezz...@gmail.com wrote: I am using prototype version 1.7 on IE8. It works fine on Firefox and Opera. The error is in this line var nodes = $(element).getElementsByTagName('*'); Below is the code around it. / *-- */ if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){ function iter(name) { return name.blank() ? null : [contains(concat(' ', @class, ' '), ' + name + ')]; } instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ? function(element, className) { className = className.toString().strip(); var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className); return cond ? document._getElementsByXPath('.//*' + cond, element) : []; } : function(element, className) { className = className.toString().strip(); var elements = [], classNames = (/\s/.test(className) ? $w(className) : null); if (!classNames !className) return elements; var nodes = $(element).getElementsByTagName('*'); className = ' ' + className + ' '; for (var i = 0, child, cn; child = nodes[i]; i++) { if (child.className (cn = ' ' + child.className + ' ') (cn.include(className) || (classNames classNames.all(function(name) { return !name.toString().blank() cn.include(' ' + name + ' '); } elements.push(Element.extend(child)); } return elements; }; return function(className, parentElement) { return $(parentElement || document.body).getElementsByClassName(className); }; }(Element.Methods); / *-- */ -- 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?hl=en.
Re: [Proto-Scripty] Re: uploading a file to a server.
Here is a simple Sample of Ajax upload using the HTML5 File API frontend javascript = $(fileupload).observe(change,handleupload); function handleupload( e ) { var el = e.findElement(); new Ajax.Request(backend.php?uploadfile=1,{method:post,postBody:el.files[0],onSuccess:returnupload}); } backend.php = if(isset($_GET['uploadfile'])) { $uploaded_file = file_get_contents(php://input); file_put_contents(/tmp/myfilename,$uploaded_file); } = You can also add other events to the Ajax call to see upload progress as well, but again will not work with IE - works in Firefox/Chrome/Safari though Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Wed, May 16, 2012 at 11:48 AM, Marty Amberg mar...@edenstreet.comwrote: Thanks Jason Will give it a shot. A example would be great, On 5/13/2012 12:32 AM, Jason wrote: Totally do-able using the HTML 5 Javascript File API (won't work in IE though) you can use the file object in the postBody option and that will upload the file to your php script through the php://input stream - use $_GET parameters for the rest of the information you want to post to solve the IE problem chromeframe is a good solution as well I can post an example if you need Jason On Sunday, April 22, 2012 4:54:45 PM UTC-7, nottobefound wrote: Hi all, Quick question. I been trying to get a file to upload to a server via a form ( works great in straight html calling a php program ) using a prototype ajax request. I don't think it can be done and I have tried various ways.If I am wrong and could some one point me in the right directions. Thanks -- EdenStreet Consulting w:978-741-7518 c:978-821-1309 Twitter: martyateden Skype: martyateden -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/lcLPBMCW9dMJ. 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. -- EdenStreet Consulting w:978-741-7518 c:978-821-1309 Twitter: martyateden Skype: martyateden -- 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?hl=en.
Re: [Proto-Scripty] Scriptaculous draggable JS links
Agreed - unless you want to maintain them yourself - linking to the google version of the files will ensure they are always the latest version and you could benefit from other site already caching the files on the user's browser -Jason On Tuesday, May 15, 2012 5:42:37 AM UTC-7, ppetree wrote: Best guess would be versioning... but regardless, link to the modules off of Google instead of locally. On May 15, 2012 8:29 AM, Robert shimield robs...@hotmail.co.uk wrote: Hi Ref: http://madrobby.github.com/scriptaculous/draggable/ My draggable script works fine when linking to script.aculo like so: script type=text/javascript src=http://script.aculo.us/prototype.js /script script type=text/javascript src= http://script.aculo.us/scriptaculous.js;/script But downloading the JS files and linking them locally it does not work: script type=text/javascript src=http://kuka/drag/prototype.js /script script type=text/javascript src=http://kuka/drag/scriptaculous.js /script Can anyone give me a hint why this is so? Many thanks, Robert Shimield Frimley Park Hospital -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/pW0DyDczMbUJ. 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 view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/JUSFdpQ31S4J. 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: Call for moderators
I would love to do this On Friday, May 11, 2012 8:09:35 AM UTC-7, T.J. Crowder wrote: Hi all, I almost never read this group anymore. When I do, there are usually a couple of messages from new members waiting to be allowed through. (I'm a moderator of the group.) Seems like the group could use at least a couple of more moderators. Who's up for being one? It takes virtually no time. If you already come to the list regularly, if you become a moderator you'll just see a notification if any messages are being held for moderation. A couple of clicks and you can either can the spam or allow the real messages. So if you're interested, please just reply to this thread. Ideally, I'd like to see replies from people who've been active on the list for at least a year. Thanks! -- 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 view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/Xm9O_00ohUIJ. 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: uploading a file to a server.
Totally do-able using the HTML 5 Javascript File API (won't work in IE though) you can use the file object in the postBody option and that will upload the file to your php script through the php://input stream - use $_GET parameters for the rest of the information you want to post to solve the IE problem chromeframe is a good solution as well I can post an example if you need Jason On Sunday, April 22, 2012 4:54:45 PM UTC-7, nottobefound wrote: Hi all, Quick question. I been trying to get a file to upload to a server via a form ( works great in straight html calling a php program ) using a prototype ajax request. I don't think it can be done and I have tried various ways.If I am wrong and could some one point me in the right directions. Thanks -- EdenStreet Consulting w:978-741-7518 c:978-821-1309 Twitter: martyateden Skype: martyateden -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/lcLPBMCW9dMJ. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Ajax.Updater insertion not working in IE
I have the following piece of code being automatically created by a Ruby on Rails function call. It works great in Firefox and Chrome, as well as IE8, but does not work in IE9. form action=/cms/quiz_questions/auto_populate id=auto_pop_questions_form method=post onsubmit=new Ajax.Updater( 'quiz_questions', '/cms/quiz_questions/auto_populate', { asynchronous:true, evalScripts:true, insertion:'after', onComplete:function(request){ toggle_hidden(quot;search_compquot;, false); update_existing_questions(); }, parameters:Form.serialize(this) } ); return false; If I remove the insertion parameter, then it works fine in IE9, but then my content gets replaced instead of added to. Why doesn't this work correctly in IE9? Or, alternatively, how can I do this AJAX call in a different way to avoid the issue? -- 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 and jQuery
You are mixing HTML (the script tag) and javascript (the rest) however using a dynamic scripting language like PHP this would be doable ie jQuery.noConflict(); (function($) { ?php include 'include_my_jquery_code'; ? })(jQuery); this is messy and I never like putting php tags in the middle of javascript if I can help it On Sep 21, 5:28 am, greg i...@wildanimaltracks.com wrote: Would the following work? jQuery.noConflict(); (function($) { script type=text/javascript src=jQuerystuff.js/script })(jQuery); On Sep 21, 5:53 am, T.J. Crowder t...@crowdersoftware.com wrote: Clarifying Marc's post, after doing jQuery.noConflict(), the jQuery shop folks can continue to use $ for jQuery stuff if they shadow the global symbol with a local one. The most common way to do that is to use a function argument: jQuery.noConflict(); (function($) { // Here, $ = jQuery because $ resolves to the argument, so $(div).css(color, blue); // Turns text in all divs blue })(jQuery); // Here, $ = Prototype because noConflict() was called, so $$(div).invoke('setStyle', {color: green}); // Turns text in all divs green FWIW, -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / com On Sep 21, 9:05 am, Marc marc.heilig...@gmail.com wrote: It's easy enough for the jQuery shop guys to use this pattern: (function($) { // jQuery stuff here })(jQuery); -- Marc On Sep 20, 8:14 pm, kstubs kst...@gmail.com wrote: I've read through the post, but need clarification on the no-conflict steps. I have written an API using prototype. I am now handing the code over to a jquery shop. They do not want to change their use of $ symbol for jquery. How can this be accomplished? Thanks, 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: $ function and IE
I actually user logic to solve your problem if($('someid') != undefined) { $('someid').hide() // or whatever you plan to do } this cuts down on a function call of invoke and the CSS parser looking for a CSS selector that matches On Aug 30, 1:40 pm, Walter Lee Davis wa...@wdstudio.com wrote: You're welcome. I gave up being surprised what IE does somewhere back in 1998. Walter On Aug 30, 2011, at 4:19 PM, Shane McCarron wrote: That's very clever. Mostly I am surprised that only IE pukes on what I assume to be a very common problem... Anyway, thanks! On Tue, Aug 30, 2011 at 3:01 PM, Walter Lee Davis wa...@wdstudio.com wrote: The easiest way around this is to write your code so it fails gracefully. Either one of these will work: $$('#noSuchElement').invoke(yourFunction); or var elm = $('noSuchElement'); if (elm) yourFunction(); The first one is my favorite, because it swallows any errors. If you're saying that you're getting an error from IE just from trying to use $('noSuchElement') all by itself, not actually trying to use the return from that, then the first method is what I would advise. Walter On Aug 30, 2011, at 3:06 PM, Shane McCarron wrote: I am sure this is a FAQ... but in IE prototype (version 1.7) throws an error when there is a reference to an ID that is not on the page (e.g., $('noSuchElement)). Is there some trick or idiom to work around this? -- Shane McCarron halindr...@gmail.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 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 prototype-scriptaculous+unsubscr...@googlegroups.com . For more options, visit this group athttp://groups.google.com/group/prototype-scriptaculous?hl=en . -- Shane McCarron halindr...@gmail.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 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: CSV to Json
Eric - that is smoother, I'll update my scripts to run it that way thanks! On Aug 22, 5:01 am, Eric lefauv...@gmail.com wrote: Jason, Why do you copy the return array into an other one before using it? (and why rewriting code already available as native PHP functions?) This should do the same than your code: $fh = fopen($filename); $fields = fgetcsv($fh); while($line = fgetcsv($fh) !== false) { print json_encode(array_combine($fields,$line));} fclose($fh); Eric PS: You may want to add some error handling :o) On Aug 20, 6:03 pm, Jason jwestbr...@gmail.com wrote: I would use a small PHP script (assuming the first line is the field names) $fields = array(); $data = array(); $fh = fopen($filename); $line = fgetcsv($fh); foreach($line as $n) { $fields[] = $n; } while($line = fgetcsv($fh) !== false) { foreach($line as $key = $n) { $data[$fields[$key]][] = $n; } } print json_encode($data); seehttp://us.php.net/fgetcsvformore examples On Aug 18, 11:24 pm, kstubs kst...@gmail.com wrote: Any tips for converting CSV to Json? I have CSV, row deliminted \n, and fields delimited with typical comma. There is a known/exisiting object type for each field. Something like: {'fields': [{'field':'fname', 'col':2}, {'field':'ssn', 'col':5}]} So I have that to work from, and will populate a Json result like this: [{'data':{'fname':value}, {'ssn':value}},{'data':{'fname':value}, {'ssn':value}}] I feel like I am doing it the long way when I: // split csv string by \n to new line array // for every item in new line split string // split item by , to field array // for every item in field array // create object to add to new data array Any ideas would help. Thanks, 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: CSV to Json
I would use a small PHP script (assuming the first line is the field names) $fields = array(); $data = array(); $fh = fopen($filename); $line = fgetcsv($fh); foreach($line as $n) { $fields[] = $n; } while($line = fgetcsv($fh) !== false) { foreach($line as $key = $n) { $data[$fields[$key]][] = $n; } } print json_encode($data); see http://us.php.net/fgetcsv for more examples On Aug 18, 11:24 pm, kstubs kst...@gmail.com wrote: Any tips for converting CSV to Json? I have CSV, row deliminted \n, and fields delimited with typical comma. There is a known/exisiting object type for each field. Something like: {'fields': [{'field':'fname', 'col':2}, {'field':'ssn', 'col':5}]} So I have that to work from, and will populate a Json result like this: [{'data':{'fname':value}, {'ssn':value}},{'data':{'fname':value}, {'ssn':value}}] I feel like I am doing it the long way when I: // split csv string by \n to new line array // for every item in new line split string // split item by , to field array // for every item in field array // create object to add to new data array Any ideas would help. Thanks, 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's evolution
So based on a handful of responses - there would be a benefit to having margins - but we still need a blessing from the core devs to either give the right people access or to start implementing it. Any of the Prototype Devs out there? On Jul 25, 11:31 am, Tom Gregory tagreg...@gmail.com wrote: Plus one from me too. I agree there should be an easy way for writing in the margins (as Walter put it). I wouldn't encourage allowing those pages to be used for help requests (which could get overwhelming for a reader to slog through), but like the php.net docs, neat solutions and gotchas related to the page's topic. Good comments could be incorporated into the docs. It's a low-commitment way to encourage contributions (w/o the need for git, patches, etc.) TAG On Jul 21, 9:42 pm, Walter Lee Davis wa...@wdstudio.com wrote: On Jul 21, 2011, at 8:32 PM, Jason wrote: I agree with both Richard and Sander - and there might be a middle ground I think that community comments, examples etc are a good addition to documentation and help users that are starting out - it would also give the new user a sense there was someplace to go for help. There has been many times I was working with a new function and was able to figure it out from the community comments instead of the official documentation (no offense intended) On the other hand full blown PHP documentation like is overkill and is too much too fast On the third hand - I would be more than happy to contribute to building the community section, but I'm not sure if a PHP guru will be much help (as I'm assuming its built on Ruby) The current documentation (1.7) is generated directly from the source code using a tool written by one of the core guys -- I think it's called jsDoc or something like that. Anyway, it's just static HTML, CSS and JavaScript (naturally) once that tool is done. I think that if there was enough energy for moderation, or some sort of community moderation system, that a great add-on to the site would be something like Disqus, so the user comments and corrections could be added to the mix. That's the thing I really love about the PHP site, and miss in other languages. It's an annotated encyclopedia that has lots of interesting stuff written in the margins by everyone else who ever used it. I can't count the number or really hard problems I was able to solve by looking at someone's example code in the comments. 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: Prototype's evolution
I agree with both Richard and Sander - and there might be a middle ground I think that community comments, examples etc are a good addition to documentation and help users that are starting out - it would also give the new user a sense there was someplace to go for help. There has been many times I was working with a new function and was able to figure it out from the community comments instead of the official documentation (no offense intended) On the other hand full blown PHP documentation like is overkill and is too much too fast On the third hand - I would be more than happy to contribute to building the community section, but I'm not sure if a PHP guru will be much help (as I'm assuming its built on Ruby) On Jul 21, 2:53 am, Richard Quadling rquadl...@gmail.com wrote: On 20 July 2011 15:26, Sander Thalen stha...@gmail.com wrote: I also recently posted on the Lighthouse ticket system. But no response. I started writing about the documentation, but also mentioned that state of the community and the future. This is what I wrote: I have a question about the API Documentation that is generally available on the website of Prototype (and just a little more). The 'new' style documentation refers to the 1.7 documentation while the old one is (good as it is!) still available which Google is still indexing and I access it via my bookmarks. I try to use the new documentation now and then but for some reason I don't think it is nice to use. Also other developers tend to use the old one, over the new one. I really believe in the Prototype library - but I also notice that the jQuery (for example) community is growing larger and larger and less people seem to be interested in Prototype. It would be great if Prototype would become more popular, so that the community grows, which hopefully supports development as well. I think this can be achieved by adding a Forum on the website, that is easily accessibly. Of course I use the Mailing List as well, but a Forum would be an easy way to access. This is however not the most important addition I think. The amount of information in the Prototype API Documentation could use a little more.. documentation. This way more people can see how the full power and potential of Prototype can be unleashed and why this is such an interesting library. A good example of what I believe that is a good manual, is the PHP manual. A semi-fixed format where you can find all the required information to quickly use the specific class/function. Especially the Examples are very handy. I know the Prototype documentation has examples, but for this new function Element.Offset only a little amount of documentation is present - actually I don't know how to use it (yet). What are the plans for the documentation? Would it be possible to add examples myself? And also.. how does the Prototype team see the future regarding a community? If this sounds like a cry for help, well.. maybe it is. But not 100% for me, but for the entire community! Regards, Sander As a member of the PHP Documentation team (an official title as PHP is an Open Source Project and any one can contribute), I'd just like to add my few pennies worth. 1 - The PHP documentation is stored as DocBook 5 XML -http://www.docbook.org/ 2 - The documentation is stored on a SubVersion server -http://svn.php.net/viewvc/phpdoc/ 3 - We have many translations, some undertaken by a handful of people. 4 - We have an online editing facility, allowing unregistered users to correct/enhance the manual, with their changes being verified by an existing member of the team -https://edit.php.net/ 5 - We also allow unregistered users to add notes to the manual. These aren't directly part of the official documentation, but can still be present within the online manual, and in offline Windows CHM files -http://www.php.net/download-docs.php 6 - You can become a member when the quality of your changes are acknowledged and supported by other members - a meritocracy. 7 - All of this may be overkill for Prototype. Richard. -- 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.
[Proto-Scripty] Effects and Google Maps
Hello all I just wanted to share an experience I had with Effects and Google Maps API environment - Firefox 4 - Google Maps API v3 - latest Script.aculo.us Effects SlideDown (and Slide Toggle()) when the hidden div that was being SlidDown to show, the google map below it was getting corrupted that would only be solved by moving the map ie div id=showme style=display:none/div div id=googlemap/div I added a timeout of 500 milisecs that panned the map by 1 px which fixes the map Also today Mozilla released Firefox 5 which does not have this problem - I have not checked IE, Chrome, Safari as of yet but wanted to let others know of a simple workaround -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: ajax.updater - json to fill select
Also make sure you exit; after the print json_ecode() so there is not additional output that will corrupt your JSON string Jason On Jun 6, 6:15 am, Eric lefauv...@gmail.com wrote: Hello, This is a little out of topic, but here are few hints: The easiest way to do that is to build a PHP array, and to use JSON_Encode to convert it into a JSON encoded string; You also need to change the content-type of your response to let prototype know it is actually JSON. Simple example: ?php $myCities = Array(Paris,Madrid,New-York,London); header('Content-Type: application/json'); print json_encode($myCities); ? Eric On Jun 4, 11:15 am, Johan Arensman johanm...@gmail.com wrote: You can use basic Json, but this is basic javascript, not specific for prototype { cars: [ { make: 'some make name', models: [ { name: 'model 1' }, { name: 'model 2' } ] }, { make: 'some other make name', models: [ { name: 'model 3' }, { name: 'model 4' } ] }, ] } Something like this? Greets, Johan On Fri, Jun 3, 2011 at 9:31 PM, Phil Petree phil.pet...@gmail.com wrote: Hey All! I'm biting the bullet and trying to break away from XML and go to json. I using Ajax.Updater to call cities.php which looks up the available cities for a given zip code (yes there can be more than one city - my zip has 4 possibilities!) and return those in a select How do these need to be returned/formatted in php? Can anyone point me to one of the car/make/model examples? I can't find one for prototype... 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-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?hl=en.
[Proto-Scripty] Re: future of script.aculo.us
I also agree with TJ as I started developing before utility JS libraries started becoming useful and had to manually code all my AJAX requests (30-40 lines down to one - :-)) but because I had to code those requests manually I understand what Ajax.Request is doing under the hood and it allows me to be a better developer. /rant On a separate point - the classes that some potential applicants have taken teach them to be completely dependent on the utility JS library and to just drop in any widget/extension found on the web. This sometimes will have unforeseen effects on the code and/or load times, and sometimes the buy(or download) versus build question is never considered. /rant On Mar 19, 1:40 pm, P.J. pjfontil...@gmail.com wrote: I agree with T.J. We shouldn't be simply teaching just how to use a certain tool but when to use them. And then learning JavaScript as a language rather than merely being exposed to it via libraries is beneficial because then your students will understand what the libraries are doing. I think this is similar to the difference between low and high level languages. As for there being multiple libraries to choose from: why can't we use both Prototype and jQuery libraries at the same time? They are both useful in different situations, and jQuery's noConflict helps resolve issues it can have with Prototype. I haven't tested other library combinations, though, and can only attest to the ability to successfully use Prototype and jQuery together in the same project. I feel that I should point out that one cost often cited when discussing the usage of multiple libraries or components is the increased size and bandwidth required due to including more components in any given project. With web applications that cost is often offset by caching and only a concern on initial page/website loads. Regardless, I wish you the best in finding topics you can teach in a field that is constantly changing. I am concerned with college programs that churn out IT type graduates with skills that can easily be replaced through outsourcing or a 6-week seminar focused solely on learning best use practices for a certain tool set. On Mar 19, 6:10 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, I find that either/or choices tend to be false choices. Not always, but frequently enough that I've taught myself to stop and ask whether it's really either/or. (Especially since my brain tends to default that way -- either/or, black/white, right/wrong -- and so I have to keep reminding myself that the world is more interesting than that...) Perhaps a both/and solution? Teach the fundamentals of JavaScript and DOM manipulation, then as an adjunct, do a section on how you can use libraries to smooth out browser differences and get useful utility functions, and that's when you introduce jQuery, Prototype, possibly a couple of the others as well. There are a *lot* of libraries out there besides jQuery and Prototype: * YUI:http://developer.yahoo.com/yui/ * Closure:http://code.google.com/closure/library * Dojo:http://dojotoolkit.org/ * Any of several others:http://en.wikipedia.org/wiki/List_of_JavaScript_libraries You can even point out how they solve the same problems differently (and how they solve other problems much the same way). You could discuss the technical pros and cons of each, and talk about how technical pros and cons do not always dictate project decisions like we engineers tend to think they should -- e.g., there are other factors to consider, like stability, pace of development, style of development, etc. That would (to my mind) more thoroughly prepare the students for going out in the world and doing useful work, even if they end up using a library that you hadn't shown them at all. From a crass commercial standpoint, I have to agree with Yuval that out in the marketplace, in today's world, right this minute, your students will get more utility out of being familiar with jQuery than being familiar with Prototype. *IF* you had to teach just one library, but again, teaching one library isn't what I'd recommend anyway. FWIW, -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / com On Mar 19, 8:53 am, yuval dagan dag...@gmail.com wrote: Hi Although I used and will use prototype, It looks (to me) currently like JQuery is much more popular than prototype I say stick to JQuery but let them know about other frameworks. But thats only my opinion Yuval On Sat, Mar 19, 2011 at 4:58 AM, Ali.MD alimihando...@gmail.com wrote: Hi every1 I'm teacher of NIIT university and teach web technology in our web department I want to change and update some our courses For example in section of javascript framework We usually recommend jquery because its easy to learn. But i thing Prototype script.aculo.us
[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] Updating arbitrary table entries
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm looking for some advice on how to update a specific field in a table. Given the following table : table tr td a href='#' onclick='editTags()'Edit/a input type='text' name='taglist[]' value='' / /td /tr /table Assume for the moment that there are multiple rows and columns. I've shown the column I'm interested in above. The editTags() function looks like this : function editTags() { new Ajax.Request('feeds_ajax.php', { method: 'post', parameters: {action: 'tagedit'}, onSuccess: function (transport) { var json = transport.responseText.evalJSON(true) if (json.success == 'true') { var editDiv = $('editDiv'); var blanketDiv = $('blanketDiv'); var blanket_height = blanket_size(); blanketDiv.style.height = blanket_height + 'px'; popUpDiv_height = blanket_height / 2 - 150; editDiv.style.top = popUpDiv_height + 'px'; var window_width = window_pos(); window_width = window_width / 2 - 150; editDiv.style.left = window_width + 'px'; editDiv.innerHTML = json.output; blanketDiv.style.display = 'block'; editDiv.style.display = 'block'; } else { ajax_error(json.error); } }, onFailure: function() { ajax_error('Server returned a failure'); } }) } This works as expected, displaying a CSS popup with the necessary information in it. Basically it's a list of tags which can be clicked and are placed into a textbox. When the user is done, they click a button and the popup vanished. What's supposed to happen is that the tags in the textbox are then transferred to the taglist field in the table. It has to be the same row as the edit link that was clicked, though. That's the part I'm having trouble with. I've done some googling, but I guess I'm not hitting the correct keywords. Can someone please assist? Thanks, - --- Jason 'XenoPhage' Frisvold xenoph...@godshell.com - --- Any sufficiently advanced magic is indistinguishable from technology. - - Niven's Inverse of Clarke's Third Law -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) iEYEARECAAYFAk1scm0ACgkQ8CjzPZyTUTR5lwCfXtJQW4f2WdHk+fKaBqZPQyZF jUUAnjrePgHg8H4ApPl8qXJPzNCMwzYc =bLtg -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Prototype - Close div when click off?
Hello, I am modifying this: http://cpicker.com/ I have made good progress, everything is working great. I now need to make one last modification. I think I need to do something like this but I am new to prototype and don't really get it. $(document.body).descendants().observe('click', function() { if ($('stroke_color').getStyle('display') == 'block') { if ({not a decendant of stroke_color}) { $('stroke_color').hide(); } } }); Can anyone help please? 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] Re: Prototype - Close div when click off?
Hi T.J. Sorry for being unclear. I want the div to close when the user clicks on anything BUT the div. What you have written makes sense with the findElement. Can findElement by used to literally find any element and then compare it to find out if it is a child or parent of the relevant div. This way I could determine if the clicked element is part of the open div, if it isn't I could then hide the div. On Sep 20, 8:12 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Not entirely sure what you're trying to do, but this will fail: $(document.body).descendants().observe ^-- Problem here `#observe` is a function Prototype adds to *elements*, not arrays. `#descendants` returns an array. Although you could fix this via `#invoke`, here's an alternative: If you're trying to catch a click wherever it occurs, just watch for it on `document` -- the click event bubbles up the hierarchy. You can find out what element the click actually happened on by using the `Event#findElement` function. That starts with the deepest-down element on which the event occurred and then searches upward for the first element matching the selector you give it. So for example, this code handles a click if it occurs in any `a` element, even if it actually occurs in a `strong` or `span` or whatever within the `a` element: Example:http://jsbin.com/upetu * * * * document.observe(click, function(event) { display(Document clicked); var a = event.findElement('a'); if (a) { display(Click was anchor ' + a.id + '!); event.stop(); // Just for our purposes a.setStyle({backgroundColor: blue}); } function display(msg) { document.body.appendChild(new Element('p').update(msg)); }}); * * * * HTH, -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / com On Sep 20, 11:47 am, Jason jasonstanle...@gmail.com wrote: Hello, I am modifying this:http://cpicker.com/ I have made good progress, everything is working great. I now need to make one last modification. I think I need to do something like this but I am new to prototype and don't really get it. $(document.body).descendants().observe('click', function() { if ($('stroke_color').getStyle('display') == 'block') { if ({not a decendant of stroke_color}) { $('stroke_color').hide(); } } }); Can anyone help please? 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.
Re: [Proto-Scripty] Re: Proper error handling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jun 22, 2010, at 2:45 AM, T.J. Crowder wrote: The answer is in the question. :-) If it's a non-HTTP error, it wouldn't be best practice to use an HTTP error code to represent the error. (Not that HTTP status codes don't have a fair bit of scope creep in them already.) That's what I figured, but I wanted to make sure I was on the right track ... I've standardized by having *all* of my Ajax calls return data in the same way. They all return JSON-formatted data, and the format for success is always: This is similar to what I was thinking. In the end, I'll have a bit of framework I can use in other applications.. In any given application, I tend to have a wrapper around Prototype's ajax stuff with some problem-domain logic in it. That wrapper always checks for the `success` flag on calls and routes to the error handler if it's not there. Which would, I suppose, extend the framework to be even more generic.. Hrm.. Presumably this is just a simple subroutine call? Not much of a performance hit, is it? FWIW, -- T.J. Crowder - --- Jason 'XenoPhage' Frisvold xenoph...@godshell.com - --- Any sufficiently advanced magic is indistinguishable from technology. - - Niven's Inverse of Clarke's Third Law -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) iEYEARECAAYFAkwiv9oACgkQ8CjzPZyTUTT8tQCeN87dhX+o0px6xNSKJJ/LbAWG kMMAn1p5Q/E47IBcxG3/LrxEDm8HH0OD =nQXW -END PGP SIGNATURE- -- 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] Proper error handling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I have a question, perhaps a bit newbie-ish, but I think it's important nonetheless. What is the proper way to handle errors reported by back-end processes via Ajax? For instance, let's take a very simple Ajax.Request call like this : new Ajax.Request('delete_item.php', { method: 'post', parameters: {action: 'delete', id: myId}, onSuccess: function() { alert('success'); }, onFailure: function() { alert('failure'); } }); Ok, simple enough. Obviously the HTTP error codes are handled here, albeit a bit generically. What about a non-HTTP error? What if, for instance, myId was invalid? What is the proper way to pass that information back to the ajax application? Is it ok to use a custom 4xx error? Or should I be using JSON or XML to handle this? Thanks! - -- - --- Jason 'XenoPhage' Frisvold xenoph...@godshell.com - --- Any sufficiently advanced magic is indistinguishable from technology. - - Niven's Inverse of Clarke's Third Law -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAkwf0l4ACgkQ8CjzPZyTUTRhOgCfUDsRAQQ/gcht2ruJLLyuqZ2g fHYAn01hvmtIuHDMZbQK1Hv2YpXDkUVp =5h5F -END PGP SIGNATURE- -- 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] Simple Prototype call runs in FF, but not IE
I'm attempting to use Prototype to build an AJAX-based die roller program. This is my first foray into Prototype and AJAX, and most of this was put together using the examples on the Prototype site, as well as a few others found around the web. Nothing elaborate. What I ended up with was a tool that runs flawlessly and without error under FF, but completely fails to run under IE (7 or 8), with errors of Object doesn't support this property or method. The program consists of a simple web form which calls another script to fetch the results, which are painted in another div. The Prototype javascript is as follows in the head: script src=/js/prototype/prototype.js language=JavaScript type=text/javascript/script script type=text/javascript language=JavaScript // ![CDATA[ function rollDice() { var url = '/campaign_manager/dice_results.cgim'; var params = Form.serialize($('dieRoller')); var ajax = new Ajax.Updater( 'die_roll_results', url, {method: 'post', parameters: params, onLoading: function () { $('die_roll_results').update('Rolling dice . . . brimg src=/images/rolling-dice.gif alt= width=71 height=46 style=margin-top: 5px;'); } } ); return false; } // ]] /script And the web form looks like: form id=dieRoller method=post onSubmit=return rollDice(this); action= table cellpadding=0 cellspacing=3 border=0 align=center tr td valign=top align=rightb# Dice:/b/td td valign=topinput type=text size=3 maxlength=3 name=die_rolls id=die_rolls value=1/td /tr tr td valign=top align=rightbType:/b/td td valign=topselect name=die_sides option value=2d2/option option value=4d4/option option value=6d6/option option value=8d8/option option value=10d10/option option value=12d12/option option value=20d20/option option value=30d30/option option value=100d100/option option value=PercentilePercentile/option /select/td /tr tr td valign=top align=rightbModifier:/b/td td valign=topinput type=text size=3 maxlength=3 name=modifier id=modifier value= span class=small_texti (optional)/i/spanbr span class=small_textModifiers may be positive or negative./ span/td /tr tr td valign=top align=rightbRoll Dice:/b/td td valign=topinput type=text size=3 maxlength=3 name=dice_sets id=dice_sets value=1 Time(s)/td /tr tr td valign=top align=left colspan=2bHighlight Roll Results That Are:/b/td /tr tr td valign=top align=rightnbsp;/td td valign=topselect name=highlight_mode id=highlight_mode option value=AboveAbove/option option value=BelowBelow/option /select input type=text size=3 maxlength=3 name=highlight_value id=highlight_value value= span class=small_texti(optional)/i/span/td /tr tr td colspan=2 align=centerinput type=submit value=Roll! input type=reset value=Reset/td /tr /table /form Under FF, the proper div updates with the dice results. Under IE 7, I receive a string of javascript errors (as noted above) and then the whole page refreshes with the die results in the proper div. Under IE 8, the browser simply stares at me like I have three eyes and does nothing at all. Real-life example here: http://www.infinitemonkeysgames.com/campaign_manager/dice.cgim Can anyone lend a hand? -- Jason -- 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: Limit number of draggables allowed in a droppable
That does work. Thank you. However I use a hoverclass in my droppable, so users can see which items they are allowed ot drop in and which they cannot. I didn't show that in my example. Incorporating your change and the hoverclass is below: style .hover { border: solid 1px red; } /style Droppables.add('myDroppable',{hoverclass:'hover', onDrop: drop); new Draggable('myDraggable'); function drop(dragged, dropped, event) { if (dragged.element.parentNode.childNodes.length 2) // 2 because of the static div { dropped.appendChild(dragged); // do something to disable the hoverclass // Droppables.remove(dropped); // possible solution } } However the problem with this is how do I re-enable the hoverclass (or droppable) when the draggable is removed? I've tried onEnd events on the draggables to re-enable but haven't gotten that to work.I should also mention that I have many draggables and many droppables (determined at run time). Thanks, Jason On Nov 19, 5:32 pm, Alex McAuley webmas...@thecarmarketplace.com wrote: If i recall correctly there is an onDrop function that you can call when initialising the droppable... So what i would do is ondrop count the elements with the classname that are inside the droppable... or even easier .. ondrop update a hidden element on the page to the value of the number of dropped elemenets in it and ondrop also check that hidden value and not let it drop if its more than 1 Both will work HTH Alex Mcauleyhttp://www.thevacancymarket.com - Original Message - From: Jason Whitmer jwhit...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Thursday, November 19, 2009 9:45 PM Subject: [Proto-Scripty] Limit number of draggables allowed in a droppable How do I limit a Droppable to contain only 1 Draggable? I have a Droppable: div id=myDroppable div id=staticTextDescription/div /div And a Draggable: div id=myDraggable DRAG ME /div Which I setup like this: Droppables.add('myDroppable'); new Draggable('myDraggable'); Thank you, Jason -- 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. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=. -- 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=.
[Proto-Scripty] Re: How do I drag out of a droppable
I fixed the issue. The trick is to set the html body element as a droppable. Droppables.add('body',{accept:'dragme',onDrop:dropBody}); function dropBody(dragged, dropped, event) { dropped.appendChild(dragged); } And add the ID to the body tag: body id=body On Nov 18, 12:27 pm, Jason Whitmer jwhit...@gmail.com wrote: I have several draggables and several droppables on the page. Using script.aculo.us, I have the ability to put draggables into droppables. I'm using this code for the onDrop to achieve this: function drop(dragged, dropped, event) { dragged.style.top = 0; dragged.style.left = 0; dropped.appendChild(dragged); } Now I need to remove draggables form droppables. I want to be able to visually drag a DIV out of a droppable and have it remove it from the droppable's child array and back into the body element. My guess is the draggable's onEnd event could trigger this, but I don't know how to get this to work. Thank you, Jason -- 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. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=.