[Rails-spinoffs] Drag'n'Drop out of overflow:auto containers

2006-05-28 Thread Jonathan Weiss
Cheers, I have some elements inside a div with overflow:auto. When I trie to drag them outside of the div, the div starts to scroll. Is there a way to stop this behaviour for drag and drop? I thought of maybe using callback to disable the overflow and restoring it againg after the drop. Did

Re: [Rails-spinoffs] JSON not auto-evaluated

2006-05-28 Thread Chris Chabot
Using prototype 1.5.0_rc0 and the Zend Framework (0.1.3) for the json part i'm able to simple do: $responses = array('a' => '1', 'b' => '2'); header('X-JSON:'.Zend_Json::encode($responses)); Note i did have to hack Zend_Json first to not quote around the property names, and only quote around the

Re: [Rails-spinoffs] JSON not auto-evaluated

2006-05-28 Thread Brice Burgess
John, I was likely "misforming" my headers. However, here's the PHP code: header('x-json: '.$encoder->encode($json)); $encoder->encode($json); just spits out a valid JSON object. If the above was; header('X-JSON: '.$encoder->encode($json)); it wouldn't work. However, I'm u

Re: [Rails-spinoffs] JSON not auto-evaluated

2006-05-28 Thread John Wang
On 5/28/06, Brice Burgess <[EMAIL PROTECTED]> wrote: Also note that from my experience, the X-JSON header is CASE SENSITIVE-- and must all be lowercase. What configuration do you run that causes X-JSON in all caps to fail? I find this interesting because: (a) X-JSON in all caps works fine for m

[Rails-spinoffs] Sortable.create containment:

2006-05-28 Thread Jonas Thomsen
hii got a problem with a Sortable.create.i got an array containing the ID of the elements i want to make an sortable of, that is no problem, but i want to be able to drag between the sortables and that where my problem is. i dont know how to assign an array to containment: until now the script look

Re: [Rails-spinoffs] JSON not auto-evaluated

2006-05-28 Thread Brice Burgess
Also note that from my experience, the X-JSON header is CASE SENSITIVE -- and must all be lowercase. ~ Brice John Wang wrote: On 5/28/06, *Dirk Eschler* <[EMAIL PROTECTED] > wrote: According to http://www.sergiopereira.com/articles/prototype.js.html, the

Re: [Rails-spinoffs] JSON not auto-evaluated

2006-05-28 Thread John Wang
On 5/28/06, Chris Chabot <[EMAIL PROTECTED]> wrote: Personally i loved the 'json in header' feature, it allowed me to havelarge quantities of html in the responce body, and some params, or otherdivs to update, etc in the x-json header .. I assume by large quantities of HTML you mean just 1 large qu

Re: [Rails-spinoffs] JSON not auto-evaluated

2006-05-28 Thread Dirk Eschler
Am Sonntag, 28. Mai 2006 17:48 schrieb John Wang: > X-JSON is the name of the custom header, not a content-type so > header("Content-Type: X-JSON") won't work. You need the X-JSON header set > to the JSON string. In PHP, do the following: > > header("X-JSON: $json"); > > I use Catalyst with the

Re: [Rails-spinoffs] JSON not auto-evaluated

2006-05-28 Thread Chris Chabot
Personally i loved the 'json in header' feature, it allowed me to have large quantities of html in the responce body, and some params, or other divs to update, etc in the x-json header .. Worked out much better then having to xml parse the responce body into sepperate entities :-) (like openrico.

Re: [Rails-spinoffs] JSON not auto-evaluated

2006-05-28 Thread John Wang
X-JSON is the name of the custom header, not a content-type so header("Content-Type: X-JSON") won't work. You need the X-JSON header set to the JSON string. In PHP, do the following:     header("X-JSON: $json"); I use Catalyst with the following. It's pretty similar to the PHP code so I expect th

Re: [Rails-spinoffs] JSON not auto-evaluated

2006-05-28 Thread Chris Chabot
Try: header('X-JSON: {some:1, json:2, string:3}'); :-) On Sun, 2006-05-28 at 17:37 +0200, Dirk Eschler wrote: > > header("Content-Type: X-JSON"); > header("Content-Type: text/x-json"); > header("Content-Type: application/x-json"); > ___ Rails-spino

Re: [Rails-spinoffs] JSON not auto-evaluated

2006-05-28 Thread Dirk Eschler
Am Sonntag, 28. Mai 2006 17:17 schrieb John Wang: > What version of prototype are you using? I think you need to be running > 1.4.0 or higher. I'm using 1.5.0 rc0 and auto-eval of X-JSON works. [...] Hi John, i'm using 1.5.0-rc0 too. So the problem must be in my PHP script. How do you send the h

Re: [Rails-spinoffs] JSON not auto-evaluated

2006-05-28 Thread John Wang
On 5/28/06, Dirk Eschler <[EMAIL PROTECTED]> wrote: According to http://www.sergiopereira.com/articles/prototype.js.html, thesecond param is supposed to be the evaluated json object IF the X-JSON header is send in the response. I send the header in my script. However, the jsonvar is always undefine

[Rails-spinoffs] JSON not auto-evaluated

2006-05-28 Thread Dirk Eschler
Hi, please consider this stripped down example: new Ajax.Request('foo.php', { onSuccess: function(t, json) { alert(json.myParam); } }); According to http://www.sergiopereira.com/articles/prototype.js.html, the second param is supposed to be the evaluated json object IF the X-JSON header

[Rails-spinoffs] Making the JS_Slideshow autoplay

2006-05-28 Thread Sam Sherlock
I am trying to make the JS_Slideshow auto play through images in the array http://www.couloir.org/js_slideshow/ I have been looking at the quote fader script used on http://rubyonrails.com/ all I have managed to do is cycle through the array with the script , now images show up and an error i

[Rails-spinoffs] stopping effects, help me again please

2006-05-28 Thread raul . andres
Hi * and thanks for you responses some body help me stop effect, just last effect. Thanks! to somebody help me with: Pulsator = Class.create(); Pulsator.prototype = {initialize: function(element) { this.stopped = false; new Effect.Pulsate(element, { afterF