[Proto-Scripty] Facing issues with Prototype.js

2010-05-24 Thread tSupreet
Hi All, First of all I would like to thanks every one to provide with such a nice repository of JavaScripts. I've recently downloaded your package and am using it for the first time. I am facing an issue though. I've a JavaScript based countdown timer in a .js file. This .js file is

[Proto-Scripty] Re: no String.insert method?

2010-05-24 Thread T.J. Crowder
Hi, no String.insert method? Correct, `String` doesn't intrinsically have an `insert` method. Is this the best way? I don't really like it.. Pretty much, except that `substr` is not part of the standard (though it's widely-supported, and it's noted in Appendix B, which is a non-

[Proto-Scripty] Re: storying and destroying metadata

2010-05-24 Thread T.J. Crowder
@Gregory: It's in 1.7. The current docs seem to have it: http://api.prototypejs.org/dom/element/store/ Before too long, some nice stuff Tobie's been doing will go live and it'll be easier to refer to the docs for the specific version you're using. -- T.J. Crowder Independent Software Consultant

[Proto-Scripty] Re: Facing issues with Prototype.js

2010-05-24 Thread T.J. Crowder
Hi, The issue is as soon as I add a script tag referring to the prototype.js file, my countdown timer stops working. You'll have to give us more information to work with, stops working is pretty vague. There could be any number of reasons for this. Two high-probability ones that come to mind:

[Proto-Scripty] Re: no String.insert method?

2010-05-24 Thread patrick
Hi TJ, Very interesting-- Could you please explain what benefit you get from doing a closure in this context? if (!String.prototype.insert) { (function() { String.prototype.insert = String_insert; I mean, from what I can tell there isn't that could interfere with anything

[Proto-Scripty] Re: no String.insert method?

2010-05-24 Thread T.J. Crowder
Hi Patrick, Very interesting--  Could you please explain what benefit you get from doing a closure in this context? Namespacing, so I can use a named function instead of an anonymous one without polluting the parent (perhaps global) namespace. More here:

[Proto-Scripty] Re: FF3/Ubuntu issues

2010-05-24 Thread foobarmus
What an incredibly helpful and in-depth answer. Thank you TJC, my confidence is restored foob On May 21, 3:18 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, It's best to actually paste in the code you're having trouble with; for obvious reasons, a lot of people won't follow links, and