[Proto-Scripty] Calling method from another method

2009-08-15 Thread Mojito
I'm a complete noob to Prototype and don't know how to call a method from another method. I'm using the [URL=http://www.prototypejs.org/learn/class- inheritance]Prototype JS library[/URL] to make classes. var myClass = Class.create({ initialize: function() {

[Proto-Scripty] Sortable onUpdate firing at the wrong time

2009-08-16 Thread Mojito
Why is the onUpdate callback fired right when the Sortable is created and not when I move an li? This code also screws up my dropping - I am forced to click again to drop. Additionally, after dragging an li, it remains translucent even after dropping it. Sortable.create( 'lineup', {

[Proto-Scripty] to NEW or not to NEW, that is the question

2009-08-20 Thread Mojito
Which is more proper? new Effect.Fade(..) or Effect.Fade(..) Both work for me. I'm just wondering which one is more cross browser compatible or runs faster. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Proto-Scripty] Typewriter effect

2009-08-20 Thread Mojito
Is there a Scriptaculous effect to spell out a word slowy: S SE SEN SENT SENTE SENTEN SENTENCE And also delete it slowly? SENTENCE SENTENC SENTEN SENTE SENT SEN SE S --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Proto-Scripty] scope of this in anonymous functions

2009-08-22 Thread Mojito
MyClass = Class.create({ initialize: function() { this.myField = null; Event.observe(window, 'load', function() { this.myField = new Field(); }); }, myMethod: function() { alert(this.myField); } }); +++ Field's constructor

[Proto-Scripty] inPlaceEditor onComplete is called when I hit cancel

2009-08-23 Thread Mojito
How do I make inPlaceEditor's onComplete callback function only called when I hit OK, and not cancel? I want to force someone to complete the form before they can continue on the page. Hitting cancel should not let them continue. --~--~-~--~~~---~--~~ You

[Proto-Scripty] Pure Prototype code was incompatible with IE8.

2009-08-31 Thread Mojito
My site works fine in FF and Safari. When tested with IE8, I get some error. It says ghost and ghostPosition are undefined. Why is my code incompatible with IE8 if my DOM reading and writing are purely done with Prototype? ++ if($$('#lineup .ghost').length ===

[Proto-Scripty] IE8 getOpacity is ALMOST correct

2009-09-01 Thread Mojito
I did an Effect.Fade() on an element to opacity 0.3. Then I check that element's opacity with $('element').getOpacity(). It returns 0.3 in Firefox, but returns 0.3004 in IE8. My application kind of depends on a predictable value. Is this a problem with IE's JS engine or is this a

[Proto-Scripty] array.indexOf fails sometimes in IE8

2009-09-01 Thread Mojito
My function works as expected in all non-IE browsers. But when I try it in IE8, it doesn't scan the array correctly. Any easy workaround rather than implementing my own indexOf()? + function isVideoFile(extension) { extension = extension.strip();

[Proto-Scripty] Ajax.updater - after text has been inserted into element

2009-09-02 Thread Mojito
I'm using the Ajax.Updater. I'm looking for the callback that is executed after the server response text has been inserted into an element. The server is inserting some form elements and I want to apply Scriptaculous's inPlaceEditor to them. Which callback would this be?