[Proto-Scripty] defaultChecked attribute for radio buttons in IE7

2011-03-03 Thread JoJo
I noticed that if I set the checked attribute on a radio button before I attach it to the DOM, IE7 will not show the button as checked when it is indeed appended to the DOM. It may happen to other IE versions too. var r = new Element( 'input', { type: 'radio' } ); if (someCondition) { r.writ

[Proto-Scripty] PeriodicalExecuter counter

2010-12-17 Thread JoJo
What's the best way to find which iteration the PeriodicalExecutuer is currently on? What I'm trying to do is step through an array slowly (period of 0.5 seconds) and having the ability to stop at an arbitrary time. The PeriodicalExecuter has the ability to stop, but it doesn't have the ability to

[Proto-Scripty] Re: Extending a DOM-Object

2010-11-22 Thread JoJo
Why is the Element::store() not listed in the documentation??? http://www.prototypejs.org/api/element . Thanks for pointing out this feature. I've been stupidly creating my own data structures to further describe DOM elements. Now I don't have to do that. On Nov 22, 12:31 pm, Luke wrote: > Thank

[Proto-Scripty] Re: Anchor button triggers window.onbeforeunload in IE

2010-10-22 Thread JoJo
ototypejs.org/dom/event/stop/ > > HTH, > -- > T.J. Crowder > Independent Software Engineer > tj / crowder software / com > www / crowder software / com > > On Oct 22, 2:41 am, JoJo wrote: > > > I use anchors to call javascript functions. Usually, I do this: > &g

[Proto-Scripty] Anchor button triggers window.onbeforeunload in IE

2010-10-21 Thread JoJo
I use anchors to call javascript functions. Usually, I do this: call the function This works fine in all browsers. Window.onbeforeunload is never triggered because the ONCLICK returns false, and thus the HREF if not executed. When HREF is not executed, the browser does not believe that the w

[Proto-Scripty] Re: Cursor blinker disappears from textarea after a clear()

2010-10-20 Thread JoJo
led when the AJAX is processing... On Oct 20, 1:36 pm, JoJo wrote: > activate() did not fix it. > > On Oct 19, 11:08 pm, Walter Lee Davis wrote: > > > Try activate in place of focus, and see if that works for you. Just   > > checking -- you do have Prototype in your page, rig

[Proto-Scripty] Re: Cursor blinker disappears from textarea after a clear()

2010-10-20 Thread JoJo
activate() did not fix it. On Oct 19, 11:08 pm, Walter Lee Davis wrote: > Try activate in place of focus, and see if that works for you. Just   > checking -- you do have Prototype in your page, right? > > Walter > > On Oct 19, 2010, at 9:59 PM, JoJo wrote: > > > I

[Proto-Scripty] Cursor blinker disappears from textarea after a clear()

2010-10-19 Thread JoJo
I'm creating a standard chat system. When the user hits the Enter key in the textarea, I send her comment to the server. Then I clear her message so she can begin typing a new one. The cursor blinker disappears when I do this clear. It's better for usability if the blinking remains. How do I put it

[Proto-Scripty] delayed show/hide does not work in IE7

2010-10-14 Thread JoJo
$('someElement').hide.delay(2); $('someElement').show.delay(3); These functions trigger this error: "'style' is null or not an object" in IE7. The only way to solve it is to write long ugly code: var f = function() { $('someElement').hide(); }; f.delay(2) -- You received this message because

[Proto-Scripty] Get scroll offsets of a DIV with overflow:auto

2010-10-04 Thread JoJo
Is there a version of document.viewport.getScrollOffsets for DIVs with CSS style of overflow:auto? I have a DIV with scroll bars and it contains 150 images. I wish to only load the images as the user scrolls to them, so I don't burden the server. To do this, I would need to detect the scroll offse

[Proto-Scripty] Safari can't pre-select a dropdown menu

2010-09-29 Thread JoJo
I am trying to pre-select an option in a standard HTML select dropdown using option.writeAttribute('selected', 'selected'). It worked in IE and FF, but not in Safari. I had to change the code to option.selected=true for all 3 browsers to work. I'd prefer to use the writeAttribute wrapper instead of

[Proto-Scripty] Re: AJAX callbacks are not executed atomically?

2010-09-24 Thread JoJo
I believe I solved the problem. I had a queue of work orders. One of these work orders queued up another work order, so it was a nested AJAX request - BAD IDEA! On Sep 24, 12:56 pm, JoJo wrote: > I don't need A to finish before B. I need A's callbacks to not be cut > off by B

[Proto-Scripty] Re: AJAX callbacks are not executed atomically?

2010-09-24 Thread JoJo
n Fri, Sep 24, 2010 at 3:21 PM, JoJo wrote: > > I have several lines of code that I want to run atomically (no context > > switches to other code). Please look at the following barebones > > example that illustrates the issue: > > > //= >

[Proto-Scripty] AJAX callbacks are not executed atomically?

2010-09-24 Thread JoJo
I have several lines of code that I want to run atomically (no context switches to other code). Please look at the following barebones example that illustrates the issue: //= function doAjax() { console.info('making request'); new Ajax.Request( url, { onSuccess: fun

[Proto-Scripty] Ajax request on anchor onclick is buggy in Safari

2010-08-10 Thread JoJo
I'm collecting stats on user clicking behavior. In this example, I write an entry into the database whenever someone clicks a link that starts a download: download program function logClick() { new Ajax.Request( '/logger.php?action=1' ); } This works great in Internet Explorer and Fi

[Proto-Scripty] Re: Conflict when Prototype is included twice

2010-07-08 Thread JoJo
only alerted "undefined" but never alerted "my code". Anyway, this is not a bulletproof solution because if the site owner's Prototype loads after mine, it will still be included twice and crash IE7. On Jul 8, 2:39 pm, JoJo wrote: > I can do a lot of things like: > >

[Proto-Scripty] Re: Conflict when Prototype is included twice

2010-07-08 Thread JoJo
existence of Prototype.Version (look in   > scriptaculous.js for the exact syntax) and then error out or skip   > loading? > > Walter > > On Jul 8, 2010, at 5:02 PM, JoJo wrote: > > > PROBLEM > > > In IE7, many of Prototype's functions stop working when Prototy

[Proto-Scripty] Conflict when Prototype is included twice

2010-07-08 Thread JoJo
PROBLEM In IE7, many of Prototype's functions stop working when Prototype.js is included twice. What is the best practice for shielding against multiple loads of Prototype? BACKGROUND I'm creating a widget script people can embed on their websites. My script uses Prototype. There's a possibility

[Proto-Scripty] detect if window is already loaded

2010-06-16 Thread JoJo
Is it possible to test whether the window has been loaded or not? I have a script.js that anyone can use. Some people will put it in the head tag, so this script will be run before Window has been loaded. Other people might do something crazier like only load script.js when someone clicks a button.

[Proto-Scripty] Hash cannot resolve variable as keys

2010-06-14 Thread JoJo
Why can't I create hashes where the keys are variables? var klass = Class.create( initialize: function() { this.field = new Hash({klass.staticVar: 999}); } ); klass.staticVar = 888; SyntaxError: missing : after property id { message="missing : after property id", more...} I

[Proto-Scripty] Re: anchor button causes IE8 to fire onbeforeunload

2010-04-24 Thread JoJo
& Executive Director, Tabby's Placehttp://www.tabbysplace.org/ > > -Original Message- > From: prototype-scriptaculous@googlegroups.com > > [mailto:prototype-scriptacul...@googlegroups.com] On Behalf Of JoJo > Sent: Saturday, April 24, 2010 4:46 PM > To: Prototype &a

[Proto-Scripty] anchor button causes IE8 to fire onbeforeunload

2010-04-24 Thread JoJo
I'm using an anchor tag to run some JS when clicked. This works perfectly in Firefox, but Internet Explorer 8 wrongfully fires the onbeforeunload callback. I know this can be solved by changing HREF="javascript:void(0)" to HREF="#", but it won't work in my situation because my anchor is very low in

[Proto-Scripty] Re: getStyle('zIndex') returns exponentiated number in Safari

2010-04-01 Thread JoJo
e range 1 through -1 gives you a massive number > (20,001) of vertical planes to stack... > > FWIW, > -- > T.J. Crowder > Independent Software Consultant > tj / crowder software / comwww.crowdersoftware.com > > On Apr 1, 1:13 am, JoJo wrote: > > > On

[Proto-Scripty] getStyle('zIndex') returns exponentiated number in Safari

2010-03-31 Thread JoJo
On all browsers but Safari, getStyle('zIndex') returns a string representation of the max integer value "2147483647" for one of my elements. However, on an older version of Safari, it return the exponentiated number "2.14748e+9". After upgrading to the newest Safari, it now returns "2.14748e+009"

[Proto-Scripty] Re: IE6 cannot run dynamicly inserted script tag

2010-03-16 Thread JoJo
anged it to: header( 'Cache-Control: max-age=0, must-revalidate, post-check=0, pre- check=0', false ); On Mar 16, 2:17 am, Daan Mortier wrote: > JoJo: > > > I'm doing some cross-site AJAX hack by dynamically inserting a script > > tag. This script tag

[Proto-Scripty] IE6 cannot run dynamicly inserted script tag

2010-03-12 Thread JoJo
I'm doing some cross-site AJAX hack by dynamically inserting a script tag. This script tag loads a PHP script that prints out javascript: $$('head').first().appendChild( new Element( 'script', { id: 'scriptTag', type: 'text/javascript', src: 'http://www.extern

[Proto-Scripty] Ajax onFailure never gets called

2010-03-10 Thread JoJo
I noticed that the onFailure callback never fires when there's actually an error in Ajax.Request. Commonly, I just alert('server busy') in the callback. I never see this alert when my web host is overloaded and just doesn't respond at all. How do I alert an error message when the server is too slow

[Proto-Scripty] getStyle('padding-top') returns different values in different browsers

2010-02-14 Thread JoJo
$('div').getStyle('padding-top') returns "1em" in Internet Explorer and "12px" in Firefox. It appears that Firefox has recursively multiplied all its ancestor's font-sizes to get the absolute value of 12px. This is actually better for the particular GUI I'm making. Is there anyway for Internet Expl

[Proto-Scripty] Update tag

2010-02-12 Thread JoJo
I want to update the title tag. This works in Firefox: $$('title').first().update('dynamic string'); Do you know why there is a runtime error in Internet Explorer 8? -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to th

[Proto-Scripty] Basic Authentication

2009-12-29 Thread JoJo
I'm using the Twitter API. It needs the user's username and password send though the Basic Authentication protocol before that user's Twitter account can be modified. I've searched for how to do Basic Authentication on the JS side (I don't want to use curl because of server load), but I've only f

[Proto-Scripty] Re: Firefox's inline JS execution order

2009-12-18 Thread JoJo
isn't being loaded more than once, are there other third- > party scripts or libraries on the page that may be interfering with ` > $A`? > > HTH, > -- > T.J. Crowder > Independent Software Consultant > tj / crowder software / comwww.crowdersoftware.com > > On Dec 15, 8:57 pm, JoJo wrote: > > > I'm creating a widget where I tell people to copy and paste this code > > onto their site: > > >    

[Proto-Scripty] Re: Firefox's inline JS execution order

2009-12-17 Thread JoJo
How does dom:ready prevent multiple executions of the same script? On Dec 16, 6:16 am, "Alex McAuley" wrote: > Why not attach the widget code to dom:ready > > Alex Mcauleyhttp://www.thevacancymarket.com > > - Original Message - > From: "JoJo&quo

[Proto-Scripty] Firefox's inline JS execution order

2009-12-15 Thread JoJo
I'm creating a widget where I tell people to copy and paste this code onto their site: http://www.site.com/script.js";> Script.js looks for all the widget divs on the page by using $$ and dynamically fills them up. Now, I'm not catering to nerd programmers who know that it's better to

[Proto-Scripty] Re: Element.update() without evaluating the script.

2009-12-07 Thread JoJo
All conditions. On Dec 7, 4:27 pm, "Rick Waldron" wrote: > What condition should exist to stop the evaluation? > > -- Sent from my Palm Prē > > JoJo wrote: > > I have a <textarea id="foo"> which contains JS code that people can > > copy and

[Proto-Scripty] Element.update() without evaluating the script.

2009-12-07 Thread JoJo
I have a which contains JS code that people can copy and paste. It's dynamically generated, so I do something like this: $('foo').update('); The documentation on Element.update states that the script will be evaluated rather than inserted literally. It does not tell me how to stop the evaluation

[Proto-Scripty] Re: Dynamically created anchor is broken in IE6 + 7

2009-12-01 Thread JoJo
I switched to using Element.observe() and it started working in IE6 & 7. I guess I don't need a solution to setting onclick directly, but if anyone has any insight, please share. Thanks. On Dec 1, 1:39 pm, JoJo wrote: > If I dynamically create an achor in IE6 and IE7, it's oncl

[Proto-Scripty] Dynamically created anchor is broken in IE6 + 7

2009-12-01 Thread JoJo
If I dynamically create an achor in IE6 and IE7, it's onclick event won't fire when clicked on. Below is an example of a static anchor and dynamic anchor - both are supposed to pop up an alert. Why does only the static anchor work? JS JS JS JS JS JS JS JS JS JS JS JS

[Proto-Scripty] Re: get body height, not viewable height

2009-11-29 Thread JoJo
entHeight; } return {width: w, height: h}; On Nov 29, 8:44 pm, JoJo wrote: > How do you get the true height of the body element? I have a very long > page and calling getDimensions() only returns the viewable area's > height. > > Thanks. -- You received this

[Proto-Scripty] Remove element after fading it

2009-11-29 Thread JoJo
I want to remove an element from the DOM after fading it. new Effect.Fade( 'lightbox', { duration: this.animationTime, afterFinish: $('lightbox').remove() } ); The above code works but gives me an error. Why is it still trying to calculate opacity after it's finished? el

[Proto-Scripty] get body height, not viewable height

2009-11-29 Thread JoJo
How do you get the true height of the body element? I have a very long page and calling getDimensions() only returns the viewable area's height. Thanks. -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send

[Proto-Scripty] Re: Hourglass cursor appear on whole page

2009-11-18 Thread JoJo
I am making a website with an embedded app, so it is very much like a desktop application. There are blocking events. On Nov 18, 12:12 am, Peter De Berdt wrote: > On 18 Nov 2009, at 01:30, JoJo wrote: > > > When the user clicks a button, I want to show an hourglass cursor > >

[Proto-Scripty] Hourglass cursor appear on whole page

2009-11-17 Thread JoJo
When the user clicks a button, I want to show an hourglass cursor while its onclick handler is being run. I tried this: $$('body').first().setStyle({cursor: 'progress'}); The hourglass only appears when I hover over the body background. When hovering over the button itself (which is an ), the cur

[Proto-Scripty] $$ is a violation of Model-View-Controller

2009-10-29 Thread JoJo
Is it poor practice to use $$? $$('#grandparent #parent tag.class'); I've been using $$ quite a lot because it has sped up DEVELOPMENT, but now I have realized that it will slow down MAINTENANCE. Recently, my boss asked me to move a whole div to another part of the page. Since I was accessi

[Proto-Scripty] Disable double click in IE6 and 7

2009-10-27 Thread JoJo
I wanted to prevent rapid double clicking of an AJAXed tab. My code works well in IE8, FF, and S. In IE7 and 6, the tab gets disabled permanently even though I see both window.status calls printing out the expected stuff. What's going on? ++ var tabOnclick = tabElement

[Proto-Scripty] Re: Ajax callbacks execute in unpredictable order

2009-10-20 Thread JoJo
of executing > ajax calls any time, for as long as you do all your ajax calls through > prototypejs (we have some old code we still need to migrate to > prototypejs, so for some of those processes, it doesn't work for us, > but this does the trick ;) ) > > Cheers, >

[Proto-Scripty] Ajax callbacks execute in unpredictable order

2009-10-19 Thread JoJo
* onUninitialized, * onLoading, * onLoaded, * onInteractive, * onComplete and * onException. I'm trying to display a swirly animated GIF while my AJAX request is being processed. I am currently using the onLoading callback to display the GIF. In some rare cases, the onLo

[Proto-Scripty] Re: element.down() invalid string

2009-10-13 Thread JoJo
der software / comwww.crowdersoftware.com > > On Oct 12, 11:52 pm, JoJo wrote: > > > > > > > Why is it that the following gives the error: [Exception... "An > > invalid or illegal string was specified" code: "12"] > > >    var title = $(cha

[Proto-Scripty] Re: Major frustrations with Effect.Morph

2009-10-12 Thread JoJo
You might want to try setting paddingLeft, paddingRight, paddingTop, paddingBottom all to 50px. I recall I ran into the same issue before and this solved it. On Oct 11, 12:41 am, "Alex McAuley" wrote: > from reading the docs Effect.morph excpects a style string using camelised > case > > I am n

[Proto-Scripty] element.down() invalid string

2009-10-12 Thread JoJo
Why is it that the following gives the error: [Exception... "An invalid or illegal string was specified" code: "12"] var title = $(channelId).down('strong').down('a').innerHTML; While this one, which looks identical to me work just fine? var title = $$('#' + channelId + ' strong a').first

[Proto-Scripty] inPlaceEditor changes from single line to multiline

2009-10-01 Thread JoJo
Upon entering the page and clicking on an inPlaceEditor, I get the expected result: single line editing of a text field. I then click "ok" without even touching the text. My PHP script trims it and spits back the value. I then click to edit again, but now the box has become a 3 multi-line box. I

[Proto-Scripty] Range utility increment

2009-09-24 Thread JoJo
http://www.prototypejs.org/api/utility/dollar-r >From the documentation of the Range utility, it seems like it can only increment by 1's. For example, $A($R(1,10,true)) gives you: [1,2,3,4,5,6,7,8,9,10]. I'm looking for a way to specify that I want to increment by any value. Let's say count up b

[Proto-Scripty] Re: Resuming a stopped PeriodicalExecuter

2009-09-18 Thread JoJo
Hi David, I know PeriodicalUpdater has a start() function, but PeriodicalExecuter does not (according to the documentation). On Sep 16, 5:27 am, david wrote: > Hi Jojo, > > if you look at prototype source, you will see that there is a start > function on the PeriodicalUpadter &g

[Proto-Scripty] Window unload - prevent leaving page

2009-09-15 Thread JoJo
I have this code and it works very well: window.onbeforeunload = function() { if (this.hasUnsavedChanges) { return 'you have unsaved changes'; } }.bind(this); + But when I try to convert it to Prototype style, it doesn't

[Proto-Scripty] Re: Highlighting text box makes it look like Windows 95

2009-09-14 Thread JoJo
try this: > > $('feedbackName')|.writeAttribute("style", null)| > > It will remove style attribute from element. > > Marko > > Alex McAuley wrote: > > setStyle() requires parameters > > > Alex Mcauley > >http://www.thevacancymarket.

[Proto-Scripty] Resuming a stopped PeriodicalExecuter

2009-09-14 Thread JoJo
http://www.prototypejs.org/api/periodicalExecuter I noticed that there is no start method of a PeriodicalExecuter. However, AJAX.PeriodicalUpdater does have one. I'm trying to mix these two types and polymorphically start and stop them. To restart a PE, do I really have to redeclare it? --~--

[Proto-Scripty] Highlighting text box makes it look like Windows 95

2009-09-11 Thread JoJo
I'm highlighting an input textbox if the user forgot to fill out the form. After the box get highlighted, it looks like retro Windows 95 with thick borders and boxy edges. So I attempt to remove the styling with an afterFinish callback, but for some reason, that is never called. Why? if ($F('fe

[Proto-Scripty] Re: Ajax.updater - after text has been inserted into element

2009-09-09 Thread JoJo
I tried to defer it, but that didn't work. It said "this.element is null" in Control.js. I'm guessing because the function wasn't deferred long enough to wait for the HTML to be inserted. new Ajax.Updater( 'placeToInsertResponse', 'ajaxScript.php', { parameters: $('formId').seria

[Proto-Scripty] Re: execution order in IE

2009-09-05 Thread JoJo
I wanted everyone to know that I was stupid to be testing this in IE8's IE7 backwards compatability mode. This error never occurs in the real IE7. It's just a warning for everyone, never use IE8's backwards mode when web designing. On Sep 4, 2:22 pm, "T.J. Crowde

[Proto-Scripty] Re: execution order in IE

2009-09-04 Thread JoJo
01 am, JoJo wrote: > Hi TJ, > > This is the simple script which will say "MYAPP.class1 is null or not > an object - Line 33" about 25% of the time on IE8 in IE7-compatability- > mode.  You must hit refresh a few times and then click the button to > see the error.  Maybe w

[Proto-Scripty] Re: execution order in IE

2009-09-04 Thread JoJo
MYAPP.class1 = new MYAPP.Class1(); }); //]]> make class1 speak + On Sep 4, 12:51 am, "T.J. Crowder" wrote: > Hi JoJo, > > I suspect there's some small (but

[Proto-Scripty] Re: Appear + IE 7

2009-09-04 Thread JoJo
I never knew about the shortcut. Could you point me to the page that talks about this? Thanks! On Sep 4, 6:30 am, mau wrote: > JoJo, thanks for your response, > > There’s also a shortcut method offered which you can call on the > element itself. Note, that this will only work

[Proto-Scripty] Re: Appear + IE 7

2009-09-03 Thread JoJo
Shouldn't it be: new Effect.Appear('menu'); On Aug 31, 7:56 am, mau wrote: > Hi, I've an issue with scriptaculous appear effect and IE  7,  when I > nest a div inside another div with display none to make it appear, it > doesn't appear slow, it appears at once. > > I call a js function when div

[Proto-Scripty] Re: execution order in IE

2009-09-03 Thread JoJo
ut is giving an error when I access it in main.js? This native and function object talk just went straight over my head. I am only a beginner to JS. On Sep 3, 10:51 pm, RobG wrote: > On Sep 4, 3:43 pm, RobG wrote: > > > > > On Sep 4, 4:40 am, JoJo wrote: > > > >

[Proto-Scripty] Re: execution order in IE

2009-09-03 Thread JoJo
gt; > Works in every browser - i had to update some code to fix similar errors on > my web desktop > > Alex Mcauleyhttp://www.thevacancymarket.com > > - Original Message - > From: "JoJo" > To: "Prototype & script.aculo.us" > Sent: Thur

[Proto-Scripty] Re: execution order in IE

2009-09-03 Thread JoJo
= new MYAPP.Class1(); MYAPP.class2 = new MYAPP.Class2(); }); On Sep 3, 10:40 am, DJ Mangus wrote: > See this > article:http://proto-scripty.wikidot.com/prototype:how-to-load-scripts-dynami... > > On Thu, Sep 3, 2009 at 9:25 AM, JoJo wrote: > > > Instead of loading JS in the , ho

[Proto-Scripty] Re: execution order in IE

2009-09-03 Thread JoJo
s i would > always wait until the dom is ready or in each function that gets called test > the function,variable or method exists else timeout untill it does > Alex Mcauleyhttp://www.thevacancymarket.com > > - Original Message - > From: "JoJo" > To: "Pro

[Proto-Scripty] execution order in IE

2009-09-02 Thread JoJo
In my , I'm loading several JS files. I'm expecting this to occur: 1) script1.js is loaded 2) script1.js runs - it creates an object 3) script2.js is loaded 4) script2.js runs - it creates a different object that depends on script1's object. 5) and so on This works perfectly in Firefox and

[Proto-Scripty] Re: array.indexOf fails sometimes in IE8

2009-09-02 Thread JoJo
I (Mojito) [don't know why my first post name differs from reply name] have solved by issue. I was passing in strings with '\0' on their ends. So 'mpg\0' does not equal 'mpg'. It was a nightmare to debug because '\0' is invisible. On Sep 2, 10:29 am, enigment wrote: > Ah, that's the missing p

[Proto-Scripty] Re: Pure Prototype code was incompatible with IE8.

2009-08-31 Thread JoJo
I'm wondering why Internet Explorer was not mentioned in http://www.prototypejs.org/api/element in that example creating the element with the class. I'm curious why Prototype doesn't just add the class for me behind the scenes... On Aug 31, 11:09 pm, "Alex McAuley" wrote: > Because IE8 does not

[Proto-Scripty] Re: does prototype have a plain timer?

2009-08-24 Thread JoJo
Nevermind. I found it though Google search: http://www.prototypejs.org/api/periodicalExecuter Boy, was it hard to find. On Aug 24, 4:24 pm, Paul Kim wrote: > I don't think Prototype has a plain timer, but couldn't you just use > setTimeOut? > > setTimeout("javascript statement", 1000); > > - P

[Proto-Scripty] Re: scope of "this" in anonymous functions

2009-08-22 Thread JoJo
is an object. Even function literals. > > On 8/22/09, JoJo wrote: > > > > > > > How do I use bind? Doesn't the bind function take an object as an > > argument? I'm doing this stuff inside a class, not an object. > > > On Aug 22, 6:15 pm,

[Proto-Scripty] Re: scope of "this" in anonymous functions

2009-08-22 Thread JoJo
How do I use bind? Doesn't the bind function take an object as an argument? I'm doing this stuff inside a class, not an object. On Aug 22, 6:15 pm, Gareth Evans wrote: > Use bind (method on the function object) > see the typewriter example i wrote for syntax > > On Sun, Aug 23, 2009 at 9:06 AM,

[Proto-Scripty] Re: to NEW or not to NEW, that is the question

2009-08-22 Thread JoJo
If I want to quickly develop without looking up whether I need NEW or don't need NEW, can I just put NEW in front of everything? Would this lead to a memory leak or does Prototype have some sort of garbage collection? On Aug 20, 2:04 am, "T.J. Crowder" wrote: > Hi, > > In general, the correct t

[Proto-Scripty] Re: Delete page on Scriptaculous Wiki

2009-08-22 Thread JoJo
And how would I contact this Thomas god? On Aug 22, 11:07 am, Walter Lee Davis wrote: > Where by Sam I meant Thomas, obviously... > > On Aug 22, 2009, at 2:04 PM, Walter Lee Davis wrote: > > > > > I asked on the Github list, and only the repo owner can delete pages > > entirely. We are free to t

[Proto-Scripty] Re: Sortable onUpdate firing at the wrong time

2009-08-15 Thread JoJo
I think I figured it out. The callback must not have parentheses. FAIL:onUpdate: someFunction(); GOOD: onUpdate: someFunction; I have no idea why. I am a beginner to JS. On Aug 15, 11:17 pm, Mojito wrote: > Why is the onUpdate callback fired right when the Sortable is created > and not wh