[Proto-Scripty] Re: Ajax call is not working in MAC(Firefox)

2009-07-21 Thread T.J. Crowder
beta. @Atanu: Firebug[1] works on the Mac, I'd suggest walking through the code in the debugger (the script panel). [1] http://getfirebug.com/ HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jul 21, 11:14 am, "Alex Mc

prototype-scriptaculous@googlegroups.com

2009-07-24 Thread T.J. Crowder
eep using your manually-patched version or grab the latest source and build it. FWIW, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jul 21, 11:05 am, Mona Remlawi wrote: > Hi T.J., > > ticket#559 is very relevant indeed, an

[Proto-Scripty] Re: Is there a standard Ajax Event ?

2009-07-24 Thread T.J. Crowder
Hi, For Ajax calls *via Prototype*, there's Ajax.Responders[1]. I'm pretty sure there's no generic event for all direct XHR uses. [1] http://prototypejs.org/api/ajax/responders HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services

[Proto-Scripty] Re: compatibility prototype_scriptaculos et mootools

2009-07-24 Thread T.J. Crowder
Hi, IIRC, MooTools started life as a fork of Prototype. I can't imagine it would be all that hard to port sound.js to it. sound.js is very short and at first glance, most of its few dependancies it has on Prototype ($, $$) are direct mappings in MooTools anyway. FWIW, -- T.J. Crowd

[Proto-Scripty] Re: scriptaculous & PHP help

2009-07-24 Thread T.J. Crowder
7;s only ever going to affect one element. If you want to affect other elements, you'll have to give them unique IDs and make the call use those IDs appropriately. FWIW, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jul 24, 7:27 p

[Proto-Scripty] Re: A ceiling for the update interval.

2009-07-26 Thread T.J. Crowder
Hi, FWIW, it sounds good to me -- useful and dead simple to implement. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jul 26, 6:39 am, Krish wrote: > It would be really useful to have a max value on update interval for &g

[Proto-Scripty] Re: get controls array

2009-07-26 Thread T.J. Crowder
tter. [1] http://prototypejs.org/api/enumerable/findall [2] http://prototypejs.org/api/element/select [3] http://prototypejs.org/api/utility/dollar-dollar [4] http://prototypejs.org/api/string/startswith HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting ser

[Proto-Scripty] Re: Using a prototype function in dynamic content.

2009-07-26 Thread T.J. Crowder
;, url); ...and then destroy it and recreate it when updating: if (editor) { editor.dispose(); editor = undefined; } $('div').update('new content'); editor = new Ajax.InPlaceEditor('editme', url); That's all inline code, you'

[Proto-Scripty] Re: RJS-Template and link_to_remote

2009-07-27 Thread T.J. Crowder
Hi, This group is for discussing Prototype and script.aculo.us, most of us have never used Ruby or Rails. You're probably better off posting to the Rails group[1]. [1] http://groups.google.com/group/rubyonrails-talk Good luck with it, -- T.J. Crowder tj / crowder software / com Indepe

[Proto-Scripty] Re: how sum value from input?

2009-07-29 Thread T.J. Crowder
at will stop at the first invalid character, so this doesn't do much in the way of validation. For instance, if the field contains "15x5", parseFloat will return 15, not NaN. If you need real validation, you'll probably want RegExps to test for valid patterns. A web search should

[Proto-Scripty] Re: postBody

2009-07-29 Thread T.J. Crowder
a really cool thing."). In transit, that string will look quite different, but you don't have to worry about it (unless you're looking at the underlying data for debugging reasons). HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services

[Proto-Scripty] Re: problems with observe mouseover and mouseout

2009-07-30 Thread T.J. Crowder
r (or from a descendant back to the main one) and ignoring that; similarly, if you're doing mouseovers, when handling them you need to check whether you're seeing a mouseover for the element you're already over (since mouseover happens repeated as the mouse moves over the element

[Proto-Scripty] Re: IE8 invalid argument line 4501

2009-07-30 Thread T.J. Crowder
l, self-contained, complete example demonstrating the problem? (Perhaps using http://pastie.org for formatting.) -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jul 30, 9:21 am, Eirik wrote: > I encountered this error in all versions of IE8 w

[Proto-Scripty] Re: Any javascript included in document loaded in div with Updater isn't recognized

2009-07-30 Thread T.J. Crowder
ype:how-to-load-scripts-dynamically FWIW, I suggest giving the API a good front-to-back read. Takes about an hour, and will save you lots of time and trouble in the long run. HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jul 3

[Proto-Scripty] Re: Using a prototype function in dynamic content.

2009-07-30 Thread T.J. Crowder
ler: * * * * some keyword ipeManager.addOrReplaceEditor( "kwdisp0101", './addkw.php', 17, 'oldwd=some%20keyword&idx=section-id&myparam=' ); * * * * [1] http://blog.niftysnippets.org/2008/03/horror-of-implicit-globals.html HTH, -- T.J. Crowder tj / crowder software / c

[Proto-Scripty] Re: ternary operators

2009-07-30 Thread T.J. Crowder
se;"); Blech blech cough retch. I bet there are others. So: *Possible*, but if/else is just a way better way to go. ;-) [1] http://blog.niftysnippets.org/2008/02/javascripts-curiously-powerful-or.html -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services av

[Proto-Scripty] Re: Escaping Input

2009-07-30 Thread T.J. Crowder
ar; params.recnum = busmstr_id; new Ajax.Request( "modules/buscal/processes/saveBooking.php", { parameters: params, onSuccess: busCal.gotEntry.bind(this), onFailure: busCal.gotFailure.bind(this) }); [1] https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Globa

[Proto-Scripty] Re: Escaping Input

2009-07-30 Thread T.J. Crowder
processes/saveBooking.php", { parameters: { year: year, recnum: busmstr_id, json: entry }, onSuccess: busCal.gotEntry.bind(this), onFailure: busCal.gotFailure.bind(this) }); Sorry 'bout that. -- T.J. :-) On Jul 30, 8:55 pm, "T.J. Crow

[Proto-Scripty] Re: What object is it exactly that's passed to the Ajax.Request onSuccess callback?

2009-07-30 Thread T.J. Crowder
Hi, Yes, those docs are messed up (out of date, I think, and will be fixed by the new documentation stuff in 1.6.1). It's an Ajax.Response[1]. [1] http://prototypejs.org/api/ajax/response HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting ser

[Proto-Scripty] Re: ternary operators

2009-07-30 Thread T.J. Crowder
Hi, I thought that too, but tried it and it didn't work, so I figured I had to be misremembering. Turns out I just messed up my test. :-) -- T.J. On Jul 31, 5:49 am, kangax wrote: > On Jul 30, 3:26 pm, "T.J. Crowder" wrote: > > > > > > > Hi Alex, >

[Proto-Scripty] Re: Using a prototype function in dynamic content.

2009-07-31 Thread T.J. Crowder
Hi, You're using the evalScripts option in your ajax call? Can you produce a small, self-contained example[1]? [1] http://proto-scripty.wikidot.com/self-contained-test-page -- T.J. :-) On Jul 31, 1:22 am, Drum wrote: > P.S. I tried with both delete eds[id];  and eds[id] = undefined. --~--~--

[Proto-Scripty] Re: Newbee question : Compatibility with javascript 1.5

2009-07-31 Thread T.J. Crowder
it's unlikely to "just work," but I suspect most of what you'll hit will be manageable. The joy is you have the source, and the license is not forbidding. [1] http://en.wikipedia.org/wiki/JavaScript#Versions Good luck, -- T.J. Crowder tj / crowder software / com Independe

[Proto-Scripty] Re: IE, attachEvent to div

2009-08-01 Thread T.J. Crowder
ee [1], scroll down to "Element as a constructor"). > element.attachEvent('onclick', function(evt) {alert('hello')} ); // If you're using Prototype, why not use Prototype?[2] [1] http://prototypejs.org/api/element [2] http://prototypejs.org/api/element/observe FWIW,

[Proto-Scripty] Re: Escaping Input

2009-08-01 Thread T.J. Crowder
;t include any characters that are special in URLs, you can skip it. Again, though, best to use the object feature of Ajax.Request and let it handle URL-encoding. Sorry for the bum steer earlier, rushing too much. "Do less, better" should be my motto. ;-) -- T.J. Crowder tj / crowder softwar

[Proto-Scripty] Re: Beginners question, trouble with Event.stop in AJAX

2009-08-02 Thread T.J. Crowder
ere's a reason you can't do that, though, the "DOM0" equivalent of Event.stop is to return false from callProcBasketPassword. HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 1, 4:35 pm, Ash wrote: > Hi, I jus

[Proto-Scripty] Re: Using a prototype function in dynamic content.

2009-08-02 Thread T.J. Crowder
as part of its processing. But if you need to do it yourself, you'd use String#evalScripts on the responseText member of the Ajax.Response passed into your onSuccess handler. [1] http://prototypejs.org/api/element/update HTH, -- T.J. Crowder tj / crowder software / com Independent Software

[Proto-Scripty] Re: Will remove() method on top DIV element automatically remove children of that element?

2009-08-02 Thread T.J. Crowder
number of handlers to a minimum. HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 2, 11:25 pm, Kostil wrote: > Hi All, > > I am wondering if remove() method executed on top DIV (parent DIV > element) will automatical

[Proto-Scripty] Re: Beginners question, trouble with Event.stop in AJAX

2009-08-03 Thread T.J. Crowder
les, some recommended reading: http://prototypejs.org/learn/introduction-to-ajax http://proto-scripty.wikidot.com/prototype:how-to-bulletproof-ajax-requests http://prototypejs.org/api/ajax/request http://prototypejs.org/api/ajax/updater HTH, -- T.J. Crowder tj / crowder software / com Independent Software

[Proto-Scripty] Re: Class.create and this keyword

2009-08-03 Thread T.J. Crowder
bt whether I've bound it. But doing it in the initializer like you have, there wouldn't be any confusion... Also, the odds are pretty high you just want #bind, not #bindAsEventListener.[1] [1] http://proto-scripty.wikidot.com/prototype:tip-you-probably-don-t-need-bindaseventlistener H

[Proto-Scripty] Re: Using a prototype function in dynamic content.

2009-08-04 Thread T.J. Crowder
al wiki [6]. [1] http://prototypejs.org/api/ajax/request [2] http://prototypejs.org/api/ajax/updater [3] http://prototypejs.org/api/element/update [4] http://prototypejs.org/api/string/evalScripts [5] http://prototypejs.org/api [6] http://proto-scripty.wikidot.com/ HTH, -- T.J. Crowder tj / crowder

[Proto-Scripty] Re: Firefox v3.5

2009-08-04 Thread T.J. Crowder
ich are valid). It's been accepted on the bug list and probably fixed by now in trunk. [1] http://www.w3.org/TR/html401/types.html#type-name -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 4, 2:46 pm, mindVex wrote: > I had sim

[Proto-Scripty] Re: How to catch/prevent onclick event?

2009-08-05 Thread T.J. Crowder
} if (!Object.isUndefined(rv) && !rv) { // Handler returned something falsey, cancel event.stop(); } }); } * * * * HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 4, 11:21 pm, Hipno

[Proto-Scripty] Re: PeriodicalExecuter Error: this.callback is not a function (prototype.js Line 308)

2009-08-07 Thread T.J. Crowder
t a function, you don't need bind: new PeriodicalExecuter(someFunction, 3); Note, again, that we are not *calling* someFunction there (there are no parens after it), we're just passing a reference to it into the constructor. [1] http://prototypejs.org/api/periodicalExecuter [2] http://prototype

[Proto-Scripty] Re: How to loop through array? New to Proto

2009-08-08 Thread T.J. Crowder
worth your time to take an hour and read through the Prototype API[4] front to back. It literally takes an hour or so, and it pays you back very very quickly. [1] http://prototypejs.org/api/enumerable/invoke [2] http://prototypejs.org/api/utility/dollar-w [3] http://proto-scripty.wikidot.com/pr

[Proto-Scripty] Re: help with select on element not working

2009-08-08 Thread T.J. Crowder
[1] http://www.w3.org/TR/html401/types.html#type-name HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 7, 8:18 pm, molo wrote: > I have the following httml and javascript code (see snippets below). > I am running this using fi

[Proto-Scripty] Re: help with select on element not working

2009-08-08 Thread T.J. Crowder
The word "but" is missing from the above "...allowing it), _but_ spaces have..." On Aug 8, 9:12 am, "T.J. Crowder" wrote: > Hi, > > > I am able to get the element lotTotalTr = $(accountTotal) to work > > IDs cannot contain spaces[1].  Apparent

[Proto-Scripty] Re: spam click = buggy???

2009-08-08 Thread T.J. Crowder
Hi, There are ways to know whether the effect is in progress and not trigger it again; apparently the functional test just doesn't use those, being a unit test rather than an application. :-) HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting ser

[Proto-Scripty] Re: Getting keys from a JSON object returned from transport.responseText.evalJSON(); or for that matter any JSON object

2009-08-10 Thread T.J. Crowder
} } ...will only alert the two you expect. All of the above is JavaScript, not Prototype; details in the spec[2]. [1] http://proto-scripty.wikidot.com/prototype:tip-looping-through-arrays [2] http://www.ecma-international.org/publications/standards/Ecma-262.htm HTH, have fun! -- T.J. Crowd

[Proto-Scripty] Re: Many warnings

2009-08-10 Thread T.J. Crowder
ty stuff here... return element; } Again, technically only one of those code paths has a return value, although in practice it's as though the "return;" were "return undefined;", and in any case it's valid syntax, just the kind of thing that *looks* lik

[Proto-Scripty] Re: Encounter a bug in endsWith ?

2009-08-10 Thread T.J. Crowder
Hi, If I assume 'input' is defined in the second example (you show it defined in the first example but not the second), I'm not seeing an error. Can you produce a small, self-contained example[1] of the problem? [1] http://proto-scripty.wikidot.com/self-contained-test-pag

[Proto-Scripty] Re: Casting a json object into an instance of a class

2009-08-12 Thread T.J. Crowder
tie.org/581050) // Defining var Thing = Class.create({ initialize: function(src) { if (src) { Object.extend(this, src); } }, isB: function() { return this.b; } }); // Using: var t; t = new Thing({"b": true}); alert("t.isB() ? &quo

[Proto-Scripty] Re: Responders

2009-08-12 Thread T.J. Crowder
updated on success) and request.container.failure (the one that will be updated on failure). As this is undocumented (AFAIK), it may change from release to release... HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 12, 9:37 am, Jez

[Proto-Scripty] Re: Prototype: getStyle of document element throws exception

2009-08-12 Thread T.J. Crowder
further up than that. Thanks, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 11, 4:29 pm, fda wrote: > Hi, we are using Prototype 1.6.0.3 in combination with Gabriel Lanzani > select.js. When loading the page in (any) IE browser, t

[Proto-Scripty] Re: Casting a json object into an instance of a class

2009-08-12 Thread T.J. Crowder
stupidly > assumed that the casting didn't work. > > At least, I now know what is the "state of the art" way of getting a > class instance through Ajax ;o) > > Thanks again! > Eric > > On Aug 12, 10:49 am, "T.J. Crowder" wrote: > > >

[Proto-Scripty] Re: Using Ajax.Updater posts the contain form

2009-08-13 Thread T.J. Crowder
etails and rationale. [1] http://proto-scripty.wikidot.com/self-contained-test-page [2] http://proto-scripty.wikidot.com/faq#xyzprob HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 13, 9:18 am, dpGoose wrote: > Hi, &

[Proto-Scripty] Re: Using Ajax.Updater posts the contain form

2009-08-13 Thread T.J. Crowder
> I assume the snippet you posted is contained in a form, right? > Button-tags are type="submit" by default... Gah! I read right past that. Nice catch. -- T.J. On Aug 13, 1:21 pm, Daniel Rubin wrote: > dpGoose wrote: > > Hi, > > > I am using Axaj.Updater to retrieve a message from the server

[Proto-Scripty] Re: How to disable draggables in script.aculo.us

2009-08-14 Thread T.J. Crowder
Hi, A brief glance at the documentation[1] suggests that you should keep a reference to the Draggables you create and when you don't want something to be draggable anymore, call the #destroy method on them. [1] http://wiki.github.com/madrobby/scriptaculous/draggable HTH, -- T.J. Crowd

[Proto-Scripty] Re: Observing a checkbox

2009-08-14 Thread T.J. Crowder
Hi, FWIW, the Abstract.EventObserver class in Prototype uses click, see lines 3,762-3,764 of 1.6.0.3. I've typically used click and haven't run into issues. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 13, 4:03

[Proto-Scripty] Re: How to disable draggables in script.aculo.us

2009-08-14 Thread T.J. Crowder
slowly. So...let's not tell him to "speed up" his code in ways that will demonstrably slow it down, eh? ;-) There are lots of reasons to use $ $ (not least almost complete support for CSS3!), and separately for using #each (more expressive IMV, less error-prone), but speed isn'

[Proto-Scripty] Re: Calling method from another method

2009-08-16 Thread T.J. Crowder
e:tip-using-an-instance-method-as-a-callback-or-event-handler HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 15, 10:27 pm, Mojito wrote: > I'm a complete noob to Prototype and don't know how to call a method >

[Proto-Scripty] Re: Element.select fails in IE

2009-08-17 Thread T.J. Crowder
Hi, You need to run your form reference through $(), e.g.: frm = $(frm); ...in order to get access to the extended methods provided by Prototype. See this article[1] on the Prototype site for details. [1] http://prototypejs.org/learn/extensions HTH, -- T.J. Crowder tj / crowder software

[Proto-Scripty] Re: Element.select fails in IE

2009-08-17 Thread T.J. Crowder
etAttribute('validations') + ']').evalJSON(); ...or better yet, have your server side output the brackets. But is that really the best way to pass the validations from server to client? FWIW, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consultin

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-18 Thread T.J. Crowder
insert, and Element#remove are left as an exercise for the reader... ;-) HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 18, 3:09 pm, bill wrote: > I've read the docs, but can't seem to figure out how to POST a form > vi

[Proto-Scripty] Re: help with select on element not working

2009-08-18 Thread T.J. Crowder
I haven't > found anything in the HTML spec that explicitly permits it)... It is in fact verboten. In HTML5, though, we're allowed to use our own attributes as long as their names start with "data-", e.g.: ...is valid but ...is not. -- T.J. Crowder tj /

[Proto-Scripty] Re: Nested updater calls , weird result

2009-08-18 Thread T.J. Crowder
Hi, How 'bout a NON-pseudo, standalone example? Because there are a number of things in that pseudo that could be tripping you up, but I figure most of them are because it's pseudo... -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services avai

[Proto-Scripty] Re: Which parameters to stopObserving are optional?

2009-08-18 Thread T.J. Crowder
docs. [1] http://prototypejs.org/api/event/stopObserving [2] http://prototypejs.org/api/event/stopobserving HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 18, 6:27 pm, Paul Lynch wrote: > I noticed in the code for stopObserving that it a

[Proto-Scripty] Re: Using Ajax.Request and evalJS to load functions on the fly

2009-08-18 Thread T.J. Crowder
lly should be in the String#evalScripts documentation, and it's on my list, but I haven't had a chance to move it. [1] http://prototypejs.org/api/ajax/updater HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 18, 8:00 p

[Proto-Scripty] Re: onclick functionality in ajax

2009-08-20 Thread T.J. Crowder
our handlers before you replace B, you'll probably leak some memory on every update; and of course if you don't hook up the new handlers you won't see the clicks. [1] http://prototypejs.org/api/event/findElement HTH, -- T.J. Crowder tj / crowder software / com Independent Software Eng

[Proto-Scripty] Re: help with select on element not working

2009-08-20 Thread T.J. Crowder
). If so, it's a misconception the W3C's own validator shares. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 19, 10:24 am, ColinFine wrote: > On Aug 18, 4:47 pm, "T.J. Crowder" wrote: > > > Colin,

[Proto-Scripty] Re: Using Ajax.Request and evalJS to load functions on the fly

2009-08-20 Thread T.J. Crowder
Hi, Can you post a minimal, self-contained example[1] of the problem? [1] http://proto-scripty.wikidot.com/self-contained-test-page -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 19, 2:39 pm, "Donnie Carvajal" wrote

[Proto-Scripty] Re: Prototype breaks the IE8 native JSON parser.

2009-08-20 Thread T.J. Crowder
hy it breaks and posting the info here, very very useful -- I'm sure you just saved the core team a fair bit of time hunting this down. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 19, 9:58 pm, Joel wrote: > See the foll

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

2009-08-20 Thread T.J. Crowder
If you use the methodized form instead: $('myNiftyFadingElement').fade(); ...you don't have to worry about it. [1] http://wiki.github.com/madrobby/scriptaculous/effect-fade [1] http://wiki.github.com/madrobby/scriptaculous/effect-opacity HTH -- T.J. Crowder tj / crowder software / com Independent Soft

[Proto-Scripty] Re: this keyword inside of the map function

2009-08-20 Thread T.J. Crowder
/prototypejs.org/api/enumerable/collect HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 20, 8:34 am, Daniel Rubin wrote: > Andy Daykin wrote: > > Hello, I am having some difficulties writing a class, in my code I have a

[Proto-Scripty] Re: Prototype breaks the IE8 native JSON parser.

2009-08-20 Thread T.J. Crowder
> > Best, > > Tobie > > On Aug 20, 10:53 am, "T.J. Crowder" wrote: > > > > > Hi, > > > Wait! Stop the presses, are you saying IE8 has...a bug in it? ;-) > > (Oh, I shouldn't be mean to Microsoft, all browsers have bugs in them, > >

[Proto-Scripty] Re: help with select on element not working

2009-08-20 Thread T.J. Crowder
Thanks, Colin, glad it was something like that. -- T.J. :-) On Aug 20, 5:43 pm, ColinFine wrote: > On Aug 20, 9:39 am, "T.J. Crowder" wrote: > > > Hi Colin, > > > > > > Incidentally (and not on topic for your question) > > > > > > &g

[Proto-Scripty] Re: this keyword inside of the map function

2009-08-20 Thread T.J. Crowder
1" and "bar: 2" as expected. Many of the Enumerable methods have this optional second context parameter. HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 21, 12:45 am, "Andy Daykin" wrote: > I tried

[Proto-Scripty] Re: Effect.Event d

2009-08-21 Thread T.J. Crowder
ish: function(effect) { effect.element.remove(); } }); HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 21, 11:40 am, tomkiller44 wrote: > Hi, > > I am using Scriptaculous through RoR and still be confused with the

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

2009-08-23 Thread T.J. Crowder
use `new` inappropriately, you will at least cause unnecessary temporary memory allocations, and at worst introduce avoidable bugs in your code. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 22, 10:09 pm, JoJo wrote: > If I wa

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

2009-08-23 Thread T.J. Crowder
-using-an-instance-method-as-a-callback-or-event-handler HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 22, 10:06 pm, Mojito wrote: > MyClass = Class.create({ >    initialize: function() { >       th

[Proto-Scripty] Re: KEY_DOWN event

2009-08-25 Thread T.J. Crowder
the mouse is clicked, which is much more reliable. HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 25, 12:09 am, Ooypunk wrote: > Hi, > > I was looking for a way to capture a mouse-click plus ctrl-button. As > I am u

[Proto-Scripty] Re: too much recursion when try to use Ajax.Request repeatly

2009-08-25 Thread T.J. Crowder
ate for your rescheduling call, but onSuccess is where you should be updating the div. 2. Using `String#startsWith`[1] rather than a regex to match "Error" at the beginning of the response text, since the matching isn't complicated. [1] http://prototypejs.org/api/string/start

[Proto-Scripty] Re: KEY_DOWN event

2009-08-25 Thread T.J. Crowder
But by all means, feel free to post a documentation ticket to Lighthouse with a patch in markdown format, contributions are welcome. :-) Details.[2] [1] http://prototypejs.org/api/event [2] http://prototypejs.org/contribute -- T.J. Crowder tj / crowder software / com Independent Software Enginee

[Proto-Scripty] Re: can I get a list of event listeners on an element?

2009-08-26 Thread T.J. Crowder
n this case via a closure) that I just didn't come up with on first thought. Now, if you're in control of the code and know things like that aren't being done, you could safely transfer the event handlers to cloned elements. But I wonder if refactoring (perhaps refactoring invo

[Proto-Scripty] Re: Ajax requests again

2009-08-26 Thread T.J. Crowder
isabled during the request and enabled when it's done. I'm sure that function as written (er, dashed off) is completely wrong for what you're trying to do, it just illustrates the idea. In my apps, I never use Ajax.Request or Ajax.Updater directly. I always have wrappers that fa

[Proto-Scripty] Re: Ajax requests again

2009-08-26 Thread T.J. Crowder
t information if you pass it into something of your own. Sorry if I'm completely missing what you're talking about, but I think a wrapper solution is your best bet. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 26, 9:53 a

[Proto-Scripty] Re: stopping the PeriodicalExecuter

2009-08-27 Thread T.J. Crowder
Hi, > I've searched high & low for this but I haven't been able to dig > anything specific up about stopping the PeriodicalExecuter. Really?[1] [1] http://prototypejs.org/api/periodicalExecuter -- T.J. Crowder tj / crowder software / com Independent Software Engineer,

[Proto-Scripty] Re: How can I replace a fx with a method call on an obj instead of passing the obj to the fx

2009-08-27 Thread T.J. Crowder
ans that to do what you're talking about, you must do two things: 1. Make doSomething a property of obj. 2. Have doSomething work with `this` rather than with an argument passed in. More about JavaScript's mythical methods in my incredibly anemic programming blog: http://blog.niftysnipp

[Proto-Scripty] Re: Detecting failure

2009-08-27 Thread T.J. Crowder
enied exception (which is as expected). With FF3.5 and Chrome2 I got blank responses. (And if Yahoo were implementing CORS, FF3.5 should work, as it supports that -- I don't think IE7 does.) [1] http://en.wikipedia.org/wiki/Same_origin_policy [2] http://www.w3.org/TR/access-control/ -- T.J.

[Proto-Scripty] Re: Strict mode?

2009-08-27 Thread T.J. Crowder
Hi Richard, Strict in what sense? -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 27, 12:04 pm, Richard Heyes wrote: > Hi, > > I'm trying to get my graphing library (RGraph) working in conjunction > with Proto

[Proto-Scripty] Re: change DOM on select option

2009-08-28 Thread T.J. Crowder
l worth taking an hour or two and reading the Prototype API[2] from beginning to end. It really only takes an hour or two, and it will save you a lot more time than that in the long run. HTH, -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Aug 27, 1:47 pm, "clicforw...@googl

[Proto-Scripty] Re: change DOM on select option

2009-08-28 Thread T.J. Crowder
Erm, I kind of forgot the links: [1] http://prototypejs.org/api/element/observe [2] http://prototypejs.org/api -- T.J. On Aug 28, 9:56 am, "T.J. Crowder" wrote: > Hi, > > >    $('#englisch').onfocus = function() { > > $() accepts IDs, not selectors -- I&

[Proto-Scripty] Re: Copy event observer

2009-08-28 Thread T.J. Crowder
Hi, Check out this recent thread on this topic: http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/e5286fee9ac18a40 HTH, -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Aug 27, 7:26 pm, louis w wrote: > I have a bit of javascript that replace

[Proto-Scripty] Re: Prototype and Cross Domain Access

2009-08-28 Thread T.J. Crowder
Conceptual/SafariJSProgTopics/Articles/XHR.html FWIW, -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Aug 28, 1:03 pm, david wrote: > Hi emooney, > > You're exemple were launch from your computer locally, not from an > external website. > I try yo

[Proto-Scripty] Re: More useful clone method

2009-08-28 Thread T.J. Crowder
Interesting you should ask that question: http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/e5286fee9ac18a40/53ff3b0aec0b293d#53ff3b0aec0b293d -- T.J. :-) On Aug 28, 8:24 pm, Matt Foster wrote: > Scenario for you... > > What if I have a parent object that I use deepClo

[Proto-Scripty] Re: hide/show div id not working - HELP!

2009-08-31 Thread T.J. Crowder
that much time across the life of your project (heck, probably even in the coming week). [1] http://prototypejs.org/api/document/observe [2] http://prototypejs.org/api/utility/dollar [3] http://prototypejs.org/api/utility/dollar-dollar [4] http://prototypejs.org/api HTH, -- T.J. C

[Proto-Scripty] Re: onchange event delegation on IE

2009-08-31 Thread T.J. Crowder
Hi Mona, Have you considered using Form.Observer[1] instead of events? [1] http://prototypejs.org/api/timedObserver/form-observer -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Aug 31, 10:07 am, Mona Remlawi wrote: > Hello Prototypers, > > I am currently in th

[Proto-Scripty] Re: prototype dom:loaded in IE 6 and 7 shows race conditions on certain environments?

2009-09-01 Thread T.J. Crowder
Hi, Can you pick up with #3 on this list: http://proto-scripty.wikidot.com/faq#xyzprob ...and post the result (unless you figure it out in the meantime)? -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Aug 31, 2:35 pm, Alexander Knöller wrote: > Hi there. >

[Proto-Scripty] Re: Safari 4 public beta issue

2009-09-01 Thread T.J. Crowder
Hi, Can you pick up with Step #3 from here[1] and post the result? If it's really a bug, that's the first step to reporting it[2]. [1] proto-scripty.wikidot.com/faq#xyzprob [2] http://prototypejs.org/contribute Thanks in advance, -- T.J. Crowder tj / crowder soft

[Proto-Scripty] Prototype 1.6.1 Released!

2009-09-01 Thread T.J. Crowder
In case anyone missed it: http://prototypejs.org/2009/9/1/prototype-1-6-1-released Kudos to the team! And separate kudos to Tobie & Andrew, who now officially take up the reins: http://prototypejs.org/2009/9/1/core-team-update-andrew-and-tobie-take-the-reins Congrats! -- T.J. Crowde

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

2009-09-02 Thread T.J. Crowder
"mpg" !== new String("mpg") even though "mpg" == new String("mpg") Oddly, I can't replicate the behavior you're seeing on IE8 if I have Prototype loaded, but I can easily do so without it by calling isVideoFile(new String(&qu

[Proto-Scripty] Re: prototype dom:loaded in IE 6 and 7 shows race conditions on certain environments?

2009-09-02 Thread T.J. Crowder
Hi, That's not a "...pared-down, self-contained example..." Please have a look at Step 3 at the link[1] again, there's a _reason_ for going through the process of creating the pared-down example. [1] http://proto-scripty.wikidot.com/faq#xyzprob -- T.J. Crowder tj / cr

[Proto-Scripty] Re: Element#Storage

2009-09-02 Thread T.J. Crowder
Is that a question? An observation? A bug report? What? -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Sep 2, 11:10 am, Yaffle wrote: > after Element removed from dom Element.Storage[uid] still exist? --~--~-~--~~~---~--~~ You recei

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

2009-09-02 Thread T.J. Crowder
g") because they're different types. See section 11.9.6 of the spec[1] for details. [1] http://www.ecma-international.org/publications/standards/Ecma-262.htm -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Sep 2, 4:56 pm, enigment wrote: > Hmmm, even outside the index

[Proto-Scripty] Re: clonePosition not behaving accurately on spans

2009-09-03 Thread T.J. Crowder
Hi, This probably isn't the answer, but FWIW, those IDs are invalid. IDs cannot start with a digit.[1] It'd be nice if correcting them happened to fix it, but I tend to doubt it. :-) [1] http://www.w3.org/TR/html401/types.html#type-name -- T.J. Crowder tj / crowder soft

[Proto-Scripty] Re: Element.setParent? Is there a core method instead I can use?

2009-09-04 Thread T.J. Crowder
nt('div', {'class': 'container'}).update ('Text in element'); HTH, -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Sep 3, 10:07 pm, dwp wrote: > Quite often I create large chunks of HTML in javascript and use the > prototype

[Proto-Scripty] Re: Element.setParent? Is there a core method instead I can use?

2009-09-04 Thread T.J. Crowder
Sorry, there should be one more closing paren on the second example. -- T.J. On Sep 4, 8:37 am, "T.J. Crowder" wrote: > Hi, > > Leaving aside the question of whether conflating statements on one > line is a good idea, you can do all of it at once like so: > > pa

[Proto-Scripty] Re: Favicon disappearing in Firefox?

2009-09-04 Thread T.J. Crowder
Firefox has *long* had favicon bugs. The symptom (and possibly the underlying cause) seems to change with every release, but there's usually a problem with them somewhere. -- T.J. On Sep 3, 4:46 pm, Walter Lee Davis wrote: > That's the odd thing. It was working, and now it's kinda working --  

[Proto-Scripty] Re: execution order in IE

2009-09-04 Thread T.J. Crowder
reasons for doing that anyway; more here.[2] [1] http://pastie.org [2] http://proto-scripty.wikidot.com/prototype:tip-minimizing-download-times HTH, -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Sep 4, 7:17 am, JoJo wrote: > My classes are just class definition

[Proto-Scripty] Re: When to expect code changes to be added to Prototype.

2009-09-04 Thread T.J. Crowder
ent, isn't it? Very big difference between enhancements and fixes. It may well be that the Core team didn't think that supporting multiple expressions in that way was appropriate for the project. -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Sep 4, 3:10 pm,

[Proto-Scripty] Re: Ajax.Updater - Sending form.serialize + other variables

2009-09-04 Thread T.J. Crowder
E.g.: var data = $('myform').serialize(true); data.more = "stuff"; new Ajax.Updater(id, url, { parameters: data }); -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Sep 4, 4:56 pm, Daniel Rubin wrote: > Senthil Krishnamoorth

  1   2   3   4   5   6   7   8   9   10   >