Hi,
I did have the second issue you have (regarding dragging from divs
with scrollbars) a couple of months ago, but didn't get any helpful
reply from the list (too specific issue perhaps).
I am sorry but the only way I could fix it was to undust my pre-
prototype drag'n drop code.
However, the
Hello everyone,
I am currently testing a site using Prototype.js (version 1.7) on
Internet Explorer 9 beta. Calling
document.fire(dom:loaded) -produces following error : SCRIPT438:
Object doesn't support this property or method. What can be wrong with
document.fire? This error does not occur when
Hello all
sorry for this stupid question, but all these talks about the *this
pointer and the variable
scope in js got me confused.
support I have 2 functions, one calling the other inside array iteration.
can they both
use the same local variable for array index ?
should I use a var statement ?
Hi there,
is this the first call to the prototype library? Maybe it does not
load correctly?
--
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
Hi there,
there are not stupid questions of course. They could be a bit more
prototype-related though...
All you should have to do is use var in order to make a variable
local to the function it is declared in. In your example that would
be:
for(var i=0;iarray_b_length;i++)
On Wed, Jan 19, 2011
Hi,
Yes, you should use a `var` statement -- specifically, two of them.
With your functions as quoted, you're falling prey to the Horror of
Implicit Globals[1], meaning that both your `A` and `B` functions are
using the *same* variable (a global variable), and so of course `B` is
interfering with
Do you try to access the same variable in both functions?
If yes you could pass the function A array length to function B or bind it
to function B.
Cheers,
Ngoc
--
Blog: http://blog.nhdoan.de
Magento: http://demo.mage.nhdoan.de
Am 19.01.2011 um 14:31 schrieb Ran Berenfeld:
Hello all
And last but not least, if this is a prototype mailing list you should
of course use prototype, so your loops would look like this:
$A(array_b_length).each(function(arrayElement) {
// do something with the element...
});
--
You received this message because you are subscribed to the Google
@Rüdiger:
And last but not least, if this is a prototype mailing list you should
of course use prototype, so your loops would look like this:
Whether I'm using Prototype or not, I don't need to create a function
and incur the overhead of a function call on every iteration (not to
mention the
Hmm, it' is the prototype way of doing it. I suppose it has to do with
writing beautiful code, but that might be a matter of taste. Some like
it and some don't :-)
On Wed, Jan 19, 2011 at 11:59 PM, T.J. Crowder t...@crowdersoftware.com wrote:
@Rüdiger:
And last but not least, if this is a
On Jan 19, 11:31 pm, Ran Berenfeld berenfeld...@gmail.com wrote:
Hello all
sorry for this stupid question, but all these talks about the *this
pointer and the variable
scope in js got me confused.
A function's this keyword has nothing to do with scope.
support I have 2 functions, one
Thank you for the advise.
one more / last question to clarify.
In one of the articles about javascript scopes I read that using var
inside a class constructor actually
creates a private member of the class. is it true ?
if this is true, then should I avoid using
for (var i=0;iarr.length;i++)
like
12 matches
Mail list logo