[Proto-Scripty] Subclassing Array

2008-12-23 Thread Jon Kleiser
Hi, I'm using prototype-1.6.0.3.js, and I'm trying to subclass Array like this: var MyArr = Class.create(Array, { initialize: function($super, arg) { $super(arg); } }); Or just like this: var MyArr = Class.create(Array, {}); Neither seems to work at all. In the Firefox Error Console I get

[Proto-Scripty] Re: Subclassing Array

2008-12-23 Thread kangax
On Dec 23, 7:23 am, Jon Kleiser jon.klei...@usit.uio.no wrote: Hi, I'm using prototype-1.6.0.3.js, and I'm trying to subclass Array like this: var MyArr = Class.create(Array, {    initialize: function($super, arg) { $super(arg); } }); Or just like this: var MyArr = Class.create(Array,

[Proto-Scripty] DOM building with Prototype library

2008-12-23 Thread Ashwin
The following code works perfectly in Firefix (3.x) and Safari (3.x), but behaves strangely short of failing in IE (7). __ html head script type=text/javascript language=JavaScript

[Proto-Scripty] AJAX JSON oddness in IE

2008-12-23 Thread timo
why do my arrays have extra methods in IE? i guess i know why.. prototype added all these prototypes to Array() but how do a get a responseJSON that's just an array? it's fine in firefox... can anyone help with this? i'm using Ajax.Request to hit a php page the returns json_encode arrays of

[Proto-Scripty] Re: - Return the new x*y position?

2008-12-23 Thread Baglan
I see 2 parts to this problem: 1. How to figure out that dragging has finished (so that AJAX request for saving new coordinates can be initiated); 2. How to figure out element position. If you're using the Scriptaulous Draggable behavior, result should look like this: script

[Proto-Scripty] Re: Options for autocompletion when there isn't enough room

2008-12-23 Thread Baglan
Hi! I see 2 parts to this problem: 1. Determining which part of the page has enough visible space (above or below the field); 2. Positioning the DIV containing the suggestions above or below. I haven't tried it yet, but (1) should be easy to do with document.viewport.getDimensions()

[Proto-Scripty] Re: AJAX JSON oddness in IE

2008-12-23 Thread developer
Firefox should be showing all of those extra items as well. And you are getting just an array. Looping through your data like: for (var i = 0; i jsonObj.length; i++) { alert(jsonObj[i]); } Will work just fine. The extra properties to the array object don't matter as long as you are

[Proto-Scripty] Re: DOM building with Prototype library

2008-12-23 Thread jason maina
Hi Ashwin, In IE for a checkbox to be checked its value is checked not true. With respect to this i'd suggest you do a browser sniff make IE have a different value from all the others. Happy holidays ;-) Regards Jason On 12/24/08, Ashwin ashwink...@gmail.com wrote: I found out from another