[Proto-Scripty] Sortable onUpdate vars

2009-05-07 Thread HostRail
How can I get the element id of a Sortable after I drop in a LI from another Sortable? I got the dragging element id with onUpdate:function(list){ alert(list.down().id); } but how can I get the ID of where it is dropped Any help on this would be awesome --~--~-~--~~~

[Proto-Scripty] Re: Prototype Ajax with Perl script gets random "internal server error"

2009-05-07 Thread T.J. Crowder
Hi, > I can really exclude an error in the server-side code. Your code, perhaps, but not the entire server side of the interaction. "500 Internal Server Error" is a _server-side_ error. That's not happening in Prototype, or in the browser at all. Something on the client-side may (or may not) be

[Proto-Scripty] Re: Help! How to get document.body height using Element.getDimensions

2009-05-07 Thread T.J. Crowder
Hi Paul, > Thanks for the clear explanation regarding the viewport's height. I did > expect the body element's height to be the viewport's height... You're not the first or only one to make that mistake. :-) > ...I thought there was a simple method in Prototype > that could easily determine the

[Proto-Scripty] Displaying sortable List/Tabs

2009-05-07 Thread Jean-Philippe Encausse
Hi, I have made sortable list () containing text input fields. Drag and Drop is working fine. Now I would like the same behavior with textarea. But textarea have a bigger height so I would like to display them an other way (tabs, accordeon, ...). Does anybody have a good feedback to did that ?

[Proto-Scripty] Re: draggable onEnd calling function

2009-05-07 Thread ColinFine
Alex has given you the solution, but I thought I'd explain it. var options = { onEnd: cool()} means "Run cool(), and whatever the result is, assign that to the property onEnd" var options = { onEnd: cool} means "Assign the object cool (which happens to be a function) to the property onEnd" If

[Proto-Scripty] Re: Sortable onUpdate vars

2009-05-07 Thread Walter Lee Davis
Well, you seem to have an answer right there in your code. > onUpdate:function(list){ alert( list.id + ': ' + list.down().id); } Walter On May 6, 2009, at 6:10 PM, HostRail wrote: > > How can I get the element id of a Sortable after I drop in a LI from > another Sortable? > I got the dragging

[Proto-Scripty] Keypress event

2009-05-07 Thread Jeztah
Afternoon guys, Having some trouble with some code... Event.observe('contents','keypress',function(event) { alert('Key got pressed ' + event); // alert(event); }); .. doesnt work (yes the element exists) Yet ,. Event.observe('contents','click',function(event) { alert('Key got presse

[Proto-Scripty] Re: Keypress event

2009-05-07 Thread Walter Lee Davis
Have you tried using document.observe, then checking Event.element() to see if the event originated in your #contents element? Walter On May 7, 2009, at 12:23 PM, Jeztah wrote: > Having some trouble with some code... > > Event.observe('contents','keypress',function(event) { > alert('Key got p

[Proto-Scripty] Re: Help! How to get document.body height using Element.getDimensions

2009-05-07 Thread Paul Kim
Hi T.J., thanks for pointing me to document.viewport. It returns the dimensions of the element. - Paul K On Thu, May 7, 2009 at 1:21 AM, T.J. Crowder wrote: > > Hi Paul, > > > Thanks for the clear explanation regarding the viewport's height. I did > > expect the body element's height to be t

[Proto-Scripty] Re: Help! How to get document.body height using Element.getDimensions

2009-05-07 Thread T.J. Crowder
Hi Paul, Hmmm, that's not what it's documented to do. Looking at the code, it's clearly trying to give you the window dimensions, not the body element. Some browsers make that harder than others. :-) -- T.J. On May 7, 5:48 pm, Paul Kim wrote: > Hi T.J., thanks for pointing me to document.vie

[Proto-Scripty] Re: Help! How to get document.body height using Element.getDimensions

2009-05-07 Thread Paul Kim
Hi T.J., that is odd... I get the same results for the width and height of the element using the code that Douglas gave me and Prototype's document.viewport.getDimensions(). You can take a look at my code at pastie.org: http://pastie.org/471309. I don't know if it makes any difference, but I have

[Proto-Scripty] Ajax.Autocompleter does not work with a WebService

2009-05-07 Thread Neo
I am trying to use Ajax.Autocompleter with a ColdFusion CFC as a webservice. The problem is the Ajax call is not firing. Any ideas why ??? var searchAutocompleter = new Ajax.Autocompleter("autocomplete", "SuggestionListDiv", "http://local.ws.mysite.com/cf/myfile_lite.cfc? method=lookAheadSearch",

[Proto-Scripty] Re: Help! How to get document.body height using Element.getDimensions

2009-05-07 Thread Paul Kim
Hi T.J., I'm sorry for any confusion, but I was trying to get the dimension of the browser window this whole time. I misunderstood the element dimension as being the same thing as the browser window dimension. - Paul K On Thu, May 7, 2009 at 10:02 AM, Paul Kim wrote: > Hi T.J., that is odd...

[Proto-Scripty] Re: Ajax.Autocompleter does not work with a WebService

2009-05-07 Thread T.J. Crowder
Hi, I see you're using an absolute URL with the autocompleter, rather than a relative one. Usually that's a red flag -- maybe you're running into SOP[1] issues? [1] http://en.wikipedia.org/wiki/Same_origin_policy HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, co

[Proto-Scripty] Re: Ajax.Autocompleter does not work with a WebService

2009-05-07 Thread Gene Aiello
I know it works if I use a relative path... but the file exists on another website within our network. I figured I code just use a URL. Can't I? How can I use a remote file? On Thu, May 7, 2009 at 12:18 PM, T.J. Crowder wrote: > Hi, > > I see you're using an absolute URL with the autocomplete

[Proto-Scripty] Re: Ajax.Autocompleter does not work with a WebService

2009-05-07 Thread T.J. Crowder
Hi, > I know it works if I use a relative path... but the file exists on another > website within our network. > I figured I code just use a URL. Can't I? > How can I use a remote file? The link I gave you answers this. That's kind of why I included it. ;-) -- T.J. Crowder tj / crowder software

[Proto-Scripty] Re: Keypress event

2009-05-07 Thread Alex McAuley
Yes i tried that and it did 'click' works and keypress works in everything except Firefox perhaps firefox just doesnt observe keypress on documents or elements and listens on input elements I will continue to investigate Ta Alex - Original Message - From: "Walter Lee Davis"

[Proto-Scripty] Re: Sortable onUpdate vars

2009-05-07 Thread Dylan Trooien
I was wrong. My method was only giving me the UL that the sortable came from. I need to know the id of what was dragged and dropped from one list to another. onUpdate fires but it how do I get the info from it? On Thu, May 7, 2009 at 5:32 AM, Walter Lee Davis wrote: > > Well, you seem to have an

[Proto-Scripty] Please Help With Code

2009-05-07 Thread z...@zanepaul.com.au
Im trying to get this code working in FireFox and Sarfari var changeStyleColour = function () { var active = null, newclass = "colourActive"; if (this.Event.addEventListener) this.Event.addEventListener ('onUnload', function () {active = null;}); return fu