On 10/5/07, Ryan Gahl [EMAIL PROTECTED] wrote:
When you call setTimout the buttonhandler reference becomes a closure :)
I don't quite understand what you mean. A variable is not a closure.
When the function gets executed by the timeout, it does not share
neither scope nor execution context with
We might be speaking about different things here.
When calling setTimeout() with a function reference, the JS engine
does not form a new closure as part of the setTimeout inner workings.
If setTimeout would create a closure, this example sould log 1 and
not undefined:
function foo(){
On 10/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
The user types in some text then immediately clicks the button, after a
brief pause for the auto-save to complete the button action should go.
function buttonhandler(){
if (autosave_in_progress){
setTimeout(buttonhandler, 100);
On 10/5/07, Ryan Gahl [EMAIL PROTECTED] wrote:
Indeed... OP dude - it's all about the closures.
Except there are no closures involved :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Spinoffs
On 8/24/07, Walter Lee Davis [EMAIL PROTECTED] wrote:
The page works perfectly in Safari 2 and Firefox 2, but stubbornly
navigates to the target of the link when clicked in Safari 1.3.9.
My Event.stop() function (Prototype 1.4 based):
stop: function(event) {
if (event.preventDefault) {
On 1/25/07, tobie [EMAIL PROTECTED] wrote:
Colin, Michael, sanitizeJSON is an option and is off by default.
Regarding your patch: Shouldn't the X-JSON processing also use evalJSON() ?
And WRT to options.sanitizeJSON, how about a AJAX.sanitizeJSON global
option for the default behaviour? Then
On 1/25/07, Martin Bialasinski [EMAIL PROTECTED] wrote:
Regarding your patch: Shouldn't the X-JSON processing also use evalJSON() ?
Oops. It does, of cause.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
On 1/25/07, tobie [EMAIL PROTECTED] wrote:
I had thaught about a global AJAX.sanitizeJSON option. It certainly
something we could implement at some point, but there are some
potential issues with that (especially if you rely on some third party
libs also using Prototype).
That would be only
On 1/24/07, tobie [EMAIL PROTECTED] wrote:
I think the issue is in how you have specified your selector (as I
mentioned in my last comment).
Doesn't adding the universal selector make it work?
I can't say, I am not the OP :-) It is just strange that the selector
would work in Firefox, but
On 1/23/07, Christophe Porteneuve [EMAIL PROTECTED] wrote:
On the other hand, I believe it would make a lot of sense to have
findFirstElement rely on tabindex attributes when they exist, which
would provide spec consistency and maximum flexibility for page developers.
This is an excellent
On 1/23/07, Tom Gregory [EMAIL PROTECTED] wrote:
My bad. I found it list here: http://prototypejs.org/discuss
Full group address: http://groups-beta.google.com/group/prototype-core
Most of my interaction with Prototype/S.a.us comes from this list.
I don't quite see the reason for the
On 1/23/07, Christophe Porteneuve [EMAIL PROTECTED] wrote:
- Spinoffs is for assistance with Prototype and script.aculo.us both.
It's mostly a helpdesk.
- Prototype-Core is the list for discussion on the evolution of
Prototype, at all levels: global architecture, individual features, etc.
On 1/23/07, RobG [EMAIL PROTECTED] wrote:
Why does Prototype use its
lengthy and (to me) very clumsy method rather than the elements
collection?
Beats me.
One solution is to use the form's elements collection, but since that
is unreliable in IE with dynamic forms,
It is?
On 1/24/07, noah_ten [EMAIL PROTECTED] wrote:
I'm having some trouble getting afterfinish to be called properly.
It is called afterFinish. Javascript is case-sensitive.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
There was a threat (or even a bug on Trac) about a bug in Firefox 2
relating to window.open(). I think this is what you see.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Ruby on Rails: Spinoffs group.
To post to
On 12/14/06, heidmotron [EMAIL PROTECTED] wrote:
script is:
Event.observe('test', 'click', function(){ alert('I am so happy') })
Your Event.observers.length is 1
then you want to remove test, so before you actually remove it from the
dom you are kind enough to say,
hey, test div, stop
Your problem description is rather confused. It is always best to put
an example online and to describe what steps to perform to see the
problem.
If you are talking about an OL-List where the number of an element
gets set to 1 when you start to drag it, then it is a bug in
Internet Explorer.
On 12/9/06, Miguel [EMAIL PROTECTED] wrote:
I'm experiencing a strange problem when trying to visualize XMLHttpRequests.
I've got Show XMLHttpRequests checked in the options of the console
window, but Firebug won't show until I disable and re-enable the option.
There is a Firebug group on
On 12/9/06, Peter Michaux [EMAIL PROTECTED] wrote:
But we are still distributing the code every time it needs to be used
If you don't use sane clientside caching.
So Prototype made the decision to have a cryptic API
It is not.
and long-named,
short-lived local variables. Seems like the
On 12/9/06, Martin Bialasinski [EMAIL PROTECTED] wrote:
On 12/9/06, Peter Michaux [EMAIL PROTECTED] wrote:
Note also that in the Prototype code
if (this.lastValue != value) {
should probably be
if (this.lastValue !== value) {
because both 0 and the empty string '' typecast
On 12/2/06, Mislav Marohnić [EMAIL PROTECTED] wrote:
How about adding an optional parameter to the existing function? With it you
could control the return type (hash or string).
Would work as well, when the default is as string. That said, the
parameter should be string|hash and not false|true
On 11/27/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I need it to go like this...
Effect.Fade,Ajax.Update,Effect.Appear
but everytime I try to do it it just trys to do all of them at once,
You need to start the next step in the callback that gets executed
when the previous step finishes.
On 12/3/06, Christophe Porteneuve [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] a écrit :
Effect.Fade,Ajax.Update,Effect.Appear
The best way to go is element-scoped effect queues.
With Ajax.Update inbetween?
--~--~-~--~~~---~--~~
You received this message
On 12/3/06, Fabian Lange [EMAIL PROTECTED] wrote:
Actually this was the first post I made here. I solved it this way:
loop: function(timePos) {
if(timePos = this.startOn) {
Element.update(this.element,this.options.newContent);
this.cancel();
return;
}
}
On 12/1/06, Stripe-man [EMAIL PROTECTED] wrote:
function menu_action(item){
var menuitem = 'div.'+item+':click';
Event.addBehavior({
// click on the green div (for fun ;-)
menuitem : function(event) {
new Effect.Highlight(this, { queue: 'end' });
}
On 11/24/06, Mislav [EMAIL PROTECTED] wrote:
On Nov 20, 11:29 pm, Martin Bialasinski [EMAIL PROTECTED] wrote:
You mean it accepts both a String or an Object as the values to be
transmitted, but does the round-trip for strings? Seems unnecessary.
The reason behind this was to reduce
On 11/14/06, Andrei Popov [EMAIL PROTECTED] wrote:
When I am tracing execution of [1] in Drosera (or Venkman, for that
matter), I see that for some reason $('myform') returns undefined
(this is n prototype.js 1.5.0_rc0). However, CSS does not seem to
have any problem styling it.
Looks like
On 11/13/06, Mark Reginald James [EMAIL PROTECTED] wrote:
does not work in the current SVN prototype because an equals
sign is appended to the post string.
Of course it is, as per docs, specs, and common sense. There should
also be the field's VALUE sent there, right after the '='
On 11/5/06, Angelo zerr [EMAIL PROTECTED] wrote:
Again, in a portal environment, where you
aren't developing a complete page and therefore can't be sure what might
be present on the page at any given time, you can run into some big
problems because of this.
This is very true.
I don't
On 11/2/06, Deco Rior [EMAIL PROTECTED] wrote:
was kind of suprised I could not find an elegant extension of this in
autocompleter
The best explanation: No one needed this so far.
Bye,
Martin
--~--~-~--~~~---~--~~
You received this message because you are
On 11/2/06, Succhan [EMAIL PROTECTED] wrote:
I just watched a screencast on how to use Firebug for debugging. So I
gave that a go.
Trying to run request.header('My-Header-Name') throws an exception that
is caught, TypeError: request.header is not a function
I would have used Firebug to set
On 11/1/06, Fred [EMAIL PROTECTED] wrote:
Incorrect. The forms collection is a formal collection in the W3C DOM
HTML specification:
alert(document.forms[0].docid.value);
Not quite. HTMLFormElement does not have a docid property defined in
the above mentioned specification. You have to
On 10/30/06, Christophe Porteneuve [EMAIL PROTECTED] wrote:
I tried subscribing and leaving an announcement
about this group
There is also a group named prototype.js
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
On 10/24/06, Thomas Fuchs [EMAIL PROTECTED] wrote:
Btw, just applied the patch to Prototype trunk, see
http://dev.rubyonrails.org/changeset/5354
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on
On 10/24/06, Zyclops [EMAIL PROTECTED] wrote:
When using form.serialize, it also includes disabled elements.
This is a bug.
Would
it be possible to alter future versions of prototype to not include
disabled elements, or have an option not to include disabled elements.
On 10/23/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
in header, i have
script type=text/javascript
new Form.Element.EventObserver(id1, function(ele,value){
$('id2').innerHTML=bal} );
/script
Execution of JS code happens as the HTMl file is parsed. The time this
code is executed,
On 9/28/06, Javier Martinez [EMAIL PROTECTED] wrote:
I have this code that creates a select multiple and three options on it.
The I select all options. In firefox and Opera it works well, but in IE the
select is not multiple and in another code, the select is multiple but only
select the last
Hi,
I cannot add comments to the bugtracker, it seems, so here we go:
There is this new method for Enumerables:
[1,2,3,4,5].inGroupsOf(3) - [[1,2,3],[4,5,null]]
To me, null is something explicitly set by the user / developer to no
value, not applicable, whereas undefined means this
On 9/22/06, Christophe Porteneuve aka TDD [EMAIL PROTECTED] wrote:
I do believe the latter values ARE undefined. What you *see* in the
text representation is a result of a pending bug in Object.inspect, that
displays undefined's as null's.
They are null alright:
inGroupsOf:
On 9/22/06, Thomas Fuchs [EMAIL PROTECTED] wrote:
hmm-- i've modelled it after the rails ruby extension[1].
Which uses nil.
Note that the german version of the article is much clearer and
mentions the synonymity of null and nil explicitly.
I believe the english version has some good
I am sorry, I did not understand you correctly. And I also have to
revise my understanding of the matter.
RFC2616, Section 2.2 says:
The TEXT rule is only used for descriptive field contents and values
that are not intended to be interpreted by the message parser. Words
of *TEXT MAY contain
On 9/12/06, Christophe Porteneuve [EMAIL PROTECTED] wrote:
Aside from the '$ overuse' issue, for/in indeed doesn't work too good on
Prototype-extended objects, what with all the methods.
for ( in ) loops are supposed to work with Objects and they do
flawlessly. This is why Object.prototype is
On 9/11/06, Nic Williams [EMAIL PROTECTED] wrote:
So would it still be useful for a revised $() function?
There is no need to change $().
What you see is the legacy of Netscape taking a stride away from the
ECMAScript standard.
Netscape's JS engine treated (and still treats) strings as array
On 9/11/06, Dr Nic [EMAIL PROTECTED] wrote:
Object.prototype.$H = function() {
Vade retro, Satanas!
This breaks the Object is an empty container and can be safely looped
with for( in ) convention.
http://erik.eae.net/archives/2005/06/06/22.13.54
44 matches
Mail list logo