[Proto-Scripty] Re: Any reason why this might not work?

2012-08-09 Thread Victor
It may fail because this code may overwrite element's properties (and in some browsers like IE and Opera some attributes, mapped as element properties). E.g. $(someInput).store(name, foo).store(type, bar); Better will be some separate container to store values inside, but this leads to

Re: [Proto-Scripty] Any reason why this might not work?

2012-08-09 Thread Victor
Internet explorer doesn't like object definitions without quotes around the names Hmm... example from Prototype 1.7 sources: Object.extend(methods, { getStorage: getStorage, store: store, retrieve: retrieve }); Quotes are required for properties matching reserved

[Proto-Scripty] Re: Event observer not working in version prototype 1.7 but works fine in 1.5

2012-08-09 Thread Victor
Form.YooEventObserver = Class.create({Abstract.EventObserver, { minQueryLength: 3, getValue: function() { // return YAHOO.util.Connect.setForm(this.element); //return Form.serialize(this.element); }, // ... other methods }); -- You received this message because you are

[Proto-Scripty] Enumerate all classes

2012-08-09 Thread Victor
Hello! I need some more ideas how to enumerate all classes - find at runtime (in browser) all classes created with Class.create(). My initial approach: function enumerateClasses() { for (var p in window) { var c = window[p]; if (Object.isFunction(c)

Re: [Proto-Scripty] Any reason why this might not work?

2012-08-09 Thread Walter Lee Davis
On Aug 9, 2012, at 5:28 AM, Victor wrote: It may fail because this code may overwrite element's properties (and in some browsers like IE and Opera some attributes, mapped as element properties). That's an excellent point. E.g. $(someInput).store(name, foo).store(type, bar); Better will be

Re: [Proto-Scripty] Any reason why this might not work?

2012-08-09 Thread Jason Westbrook
I agree that some code is not always written like that - but I've had many instances where a javascript block would work in modern standards compliant browsers yet fail silently in IE until I put quotes in, single or double. Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Thu, Aug