[Proto-Scripty] Re: Custom JS breaking in IE6,7 - Tips on debugging?

2009-05-17 Thread Tobie Langel
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); // -

[Proto-Scripty] Re: Custom JS breaking in IE6,7 - Tips on debugging?

2009-05-17 Thread Vinay Seshadri
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

[Proto-Scripty] Re: Custom JS breaking in IE6,7 - Tips on debugging?

2009-05-17 Thread T.J. Crowder
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

[Proto-Scripty] Re: Is this possible? can anyone provide a sample code please?

2009-05-17 Thread Carlos Cardoso
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

[Proto-Scripty] Re: Custom JS breaking in IE6,7 - Tips on debugging?

2009-05-17 Thread Vinay Seshadri
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

[Proto-Scripty] Re: Custom JS breaking in IE6,7 - Tips on debugging?

2009-05-17 Thread T.J. Crowder
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),

[Proto-Scripty] Re: Custom JS breaking in IE6,7 - Tips on debugging?

2009-05-17 Thread Vinay Seshadri
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

[Proto-Scripty] Preserving Variables Through Page Load

2009-05-17 Thread Doug Reeder
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

[Proto-Scripty] Re: Prototype/Javascript scoping question

2009-05-17 Thread kangax
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

[Proto-Scripty] Using Prototype with XL-DOM-API

2009-05-17 Thread Benedikt.Rothe
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 =

[Proto-Scripty] Re: Preserving Variables Through Page Load

2009-05-17 Thread Benedikt.Rothe
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

[Proto-Scripty] Re: Prototype/Javascript scoping question

2009-05-17 Thread Tobie Langel
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

[Proto-Scripty] Effect.SlideUp

2009-05-17 Thread Kazimir
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

[Proto-Scripty] Re: Prototype/Javascript scoping question

2009-05-17 Thread T.J. Crowder
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?