JavaScript has got this weird flaw, that if you forget to declare a
variable using the var keyword, the variable is declared in the
global scope instead of the current scope.
For example:
function foo() {
bar = 1;
var baz = 2;
}
foo();
console.log(bar);
// - 1
console.log(baz);
// -
Thanks a lot Tobie! :) Ill check those out. Learning JS in detail is
definitely a must do for me, AFTER this project :D.
On Sun, May 17, 2009 at 12:02 PM, Tobie Langel tobie.lan...@gmail.comwrote:
JavaScript has got this weird flaw, that if you forget to declare a
variable using the var
Hi,
Thanks a lot Tobie! :) Ill check those out. Learning JS in detail is
definitely a must do for me, AFTER this project :D.
FWIW, I suspect you'll save time even on this project if you take an
hour to read through the Prototype API[1] from beginning to end,
especially now that you've got
So funny. i already understand that no one will help.
my question has two parts. one, if it's possible, and the second, if anyone
can provide a sample code of how it's donne, in hope that someone already
saw it in use in any place and remember the link.
nothing more. doesn.t ask to do homework for
Hi Crowder,
I actually did spend a couple of hours on the API a few months back when I
had to write this JS code im talking about. I must admit though, that I
conveniently concentrated only on those methods that I felt I required to
accomplish what I had to. What I really need is to understand
Hi,
Thanks a lot for those :). Are there any other concepts you would suggest
for a guy with mostly a Ruby and C background? Things i might find differnet
from the kind of coding im used to.
No worries. Just very quickly off-the-cuff (and you'll find some
posts about this on niftysnippets),
Wow! A generous contribution indeed! Thanks a lot! I'd feel guilty if I dint
read up on it now.. :)
Feels like a whole new world. Especially since using Prototype is actually
directly extending the DOM element. Feels like there's a LOT of power in
good HTML+CSS+JS that can be exploited to do a lot
It appears that calling location.assign() deletes all global variables
(which is reasonable behavior for a web browser). However, I have a
web application written as several pages. One good way to preserve
data across page loads is to keep session info on the server.
However, I would
On May 16, 12:51 pm, Tobie Langel tobie.lan...@gmail.com wrote:
FYI, fastest way is #1 as you're avoiding creating a closure
altogether (just using Function#call internally).
Isn't closure formed in both #1 and #2 as soon as FunExpr. (passed to
`each`) is being evaluated?
[...]
--
kangax
Hi
Can I use the Prototype-Element-Class with Ajax-loaded XML?
Follwing code doesn't work for me:
script type=text/javascript
new Ajax.Request(XMLRDB.xml , {
method: 'get',
onSuccess: function(transport) {
var xml = transport.responseXML;
var bw =
Hi
Maybe this one is helpfull:
http://jason.pureconcepts.net/articles/javascript_cookie_object
Data is stored in cookies in JSON-Format.
Bye, Benedikt
PS: I don't really know wether (but dont't believe that) JavaScript-
variables can be passed
between pages directly.
On May 17, 5:31 pm, Doug
Isn't closure formed in both #1 and #2 as soon as FunExpr. (passed to
`each`) is being evaluated?
Right, I was assuming correct syntax for #1 (my bad):
$R(1,2).each(this.bar, this);
which avoids the extra closure altogether.
--~--~-~--~~~---~--~~
You
Hello,
Is there any way that the Effect.SlideUp can be setup so that it is in
the 'closed' position on page load?
Thanks,
K.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To
Right, I was assuming correct syntax for #1 (my bad):
As I said, I was assuming he was doing more than just this.bar().
-- T.J.
On May 17, 9:58 pm, Tobie Langel tobie.lan...@gmail.com wrote:
Isn't closure formed in both #1 and #2 as soon as FunExpr. (passed to
`each`) is being evaluated?
14 matches
Mail list logo