Re: [Rails-spinoffs] Drag & Scroll

2005-11-11 Thread Thomas Fuchs
Thanks for this, i'll definitely want to include it! What I want to see too is support for scrolling containers that have overflow:auto/scroll set. Could this be added? It should probably search for first parent that has overflow:auto set, if none is found, scroll the page. Maybe there should b

[Rails-spinoffs] array.each() on associative array?

2005-11-11 Thread Stich, Josef
Hi List!   Is there a way to iterate through an associative array when prototype.js is used?       arrayname.each(function (i) {    alert(i); }); seems to work only for numeric arrays.     Thanks, Josef Stich   _

[Rails-spinoffs] A couple of draggable patches...

2005-11-11 Thread Saimon Moore
Hi all, I've just raised a ticket with a patch for enabling 'snapToGrid' feature for draggables. I'm writing a framework on top of scriptaculous and it appeared to me that this would be something that could belong to core Draggable objects. To activate, just add to draggable options on creation.

RE: [Rails-spinoffs] array.each() on associative array?

2005-11-11 Thread Gregory Hill
Can’t you just do this?  It’s built into _javascript_: for (key in arrayname) {     alert(key + ‘=’ + arrayname[key]); }     From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stich, Josef Sent: Friday, November 11, 2005 3:32 AM To: rails-spinoffs@lists.rub

RE: [Rails-spinoffs] Drag & Scroll

2005-11-11 Thread Gregory Hill
Ooh, that's a good idea about the parent element; I'll have to see what's possible there. We could provide the option to turn off scrolling or specify which element to scroll, but by default I think it should do the nearest parent element that is scrollable. That seems the most intuitive to me.

Re: [Rails-spinoffs] array.each() on associative array?

2005-11-11 Thread Thomas Fuchs
Be careful with for .. in .. loops when you're treating objects as associative arrays. for .. in .. iterates over all properties, which include functions the object has. So, having an object like this: var obj = { a: 1, b: 2, test: function() { } } for .. in ... wi

[Rails-spinoffs] Re: Rails-spinoffs Digest, Vol 6, Issue 17

2005-11-11 Thread Kiran Nibbaragandla
osef Stich-- next part --An HTML attachment was scrubbed...URL: http://wrath.rubyonrails.org/pipermail/rails-spinoffs/attachments/2005/a429ae7d/attachment-0001.html--Message: 2Date: Fri, 11 Nov 2005 08:39:14 -0700From: "Gregory Hill" < [EMAIL P

AW: [Rails-spinoffs] array.each() on associative array?

2005-11-11 Thread Stich, Josef
Prototype.js seems to extend the standard _javascript_ array constructor. It adds some methods and properties.   If I do the for (key in array) I get additional keys that I didn’t add.   Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag v

[Rails-spinoffs] InPlaceEditor trouble

2005-11-11 Thread R. Saccon
Hi allthis is my first post to this list. Im am trying to use the InPlaceEditor, but I only manage to make it work in very simple case as in teh demo on the wiki. In my case I have a list of records ("books")  with different fields and each field has an InPlaceEditor. My problem is how to pass teh

[Rails-spinoffs] Autocomplete Help

2005-11-11 Thread Nick Fitzpatrick
My input box show a blank result after selecting something from the customized autocompletion drop down list? I am using scriptaculous 1.5_rc4 This is the result that I am trying to accomplish: http://script.aculo.us/demos/ajax/autocompleter_customized Thanks for the help ___

Re: [Rails-spinoffs] InPlaceEditor trouble

2005-11-11 Thread Jon Tirsen
In Rails the best way is probably to use the URL itself rather than a parameter. Like this: new Ajax.InPlaceEditor('title-<%= book.id -%>', <%= url_for :action => 'update_book_title', :id => book.id %>); I don't think the error you're getting is related to the InPlaceEditor at all.

[Rails-spinoffs] Rapid Ajax requests out of order

2005-11-11 Thread Joshua Sierles
I'm trying to write an ajax chat. I'm noticing that when ajax requests are fired off in rapid succession, they often will arrive out of order to the server. Has anyone experienced this problem, and perhaps implemented some kind of queueing system? Any other suggestions? Thanks! Thanks, Joshua Sier

Re: [Rails-spinoffs] Rapid Ajax requests out of order

2005-11-11 Thread Travis Reeder
You may want to try putting sequence numbers on each request so if one comes in that is out of order, you'll know. TravisOn 11/11/05, Joshua Sierles <[EMAIL PROTECTED]> wrote: I'm trying to write an ajax chat. I'm noticing that when ajax requestsare fired offin rapid succession, they often will ar

Re: [Rails-spinoffs] Rapid Ajax requests out of order

2005-11-11 Thread Joshua Sierles
That's a possibility, but that would require a delay on the server side where I buffer X number of connections and make sure they are ordered correctly before those messages are saved to the db, or sent off to another user. So, if there has to be a buffer, where? Joshua Sierles On 11/12/05, Travi

Re: [Rails-spinoffs] Rapid Ajax requests out of order

2005-11-11 Thread Michael Peters
Joshua Sierles wrote: > That's a possibility, but that would require a delay on the server > side where I buffer X number of connections and make sure they are > ordered correctly before those messages are saved to the db, or sent > off to another user. So, if there has to be a buffer, where? It

Re: [Rails-spinoffs] Rapid Ajax requests out of order

2005-11-11 Thread Joshua Sierles
I noticed that a queueing mechanism like this has been added to scriptaculous for visual effects. Maybe it could be adapted for Prototype? Ajax.ThrottledRequest Joshua Sierles On 11/12/05, Michael Peters <[EMAIL PROTECTED]> wrote: > > > Joshua Sierles wrote: > > That's a possibility, but that wou

Re: [Rails-spinoffs] InPlaceEditor trouble

2005-11-11 Thread R. Saccon
Jon, thanks very much, it was a typo, and now it works great.On 11/11/05, Jon Tirsen <[EMAIL PROTECTED]> wrote: In Rails the best way is probably to use the URL itself rather than aparameter. Like this: new Ajax.InPlaceEditor('title-<%= book.id -%>',   <%= url_for :action ="" 'update_bo