[Proto-Scripty] Need explanation

2009-07-08 Thread jakir
/* Based on Alex Arnell's inheritance implementation. */ var Class = { create: function() { var parent = null, properties = $A(arguments); if (Object.isFunction(properties[0])) parent = properties.shift(); function klass() { this.initialize.apply(this, arguments); }

[Proto-Scripty] Limit depth of Sortable Tree

2009-07-08 Thread Kevin
I'm attempting to make a list of grouped terms. I'm approaching this by creating a Sortable object as a tree, so the user will be able to drag terms into and out of groups, as well as reordering the groups themselves. I do not want the user to be able to drag a group into another group. I was w

[Proto-Scripty] Getting the value of a selected option

2009-07-08 Thread skunkbad
I've got a standard select box with options, and the select box has an id of "theme_choice" I've found the following script online, but it isn't popping up an alert when a selection is made: $$('#theme_choice').each(function(elem){ if (elem.selected) alert(elem.t

[Proto-Scripty] Sortable lists don't drag smoothly with newer versions of scriptaculous

2009-07-08 Thread emz452
Hi there, I have a sortable list using scriptaculous, nothing fancy or unusual. When I use an older version of the dragdrop.js file (e.g. v1.5), it works as expected. The dragging of list elements to sort them, is smooth. When I use the latest version and try to drag a list element, it's jerky

[Proto-Scripty] Re: Any way to access class attributes when using 'each' to iterate over an array?

2009-07-08 Thread T.J. Crowder
Hi, Within the function called by #each, by default the context (the "this" value) is a reference to the global object ('window', on web browsers), not the same context as the code calling #each. This is how JavaScript functions work: Unless you do something to explicitly set "this" when callin

[Proto-Scripty] Re: Getting the value of a selected option

2009-07-08 Thread T.J. Crowder
Hi, > I've found the following script online, but it isn't popping up an > alert when a selection is made: You're not asking it to. :-) You're asking it to pop up an alert if something is selected at the moment you're calling that code; you haven't hooked up an event handler. To make it happen

[Proto-Scripty] Re: Any way to access class attributes when using 'each' to iterate over an array?

2009-07-08 Thread David Behler
Thanks alot! That worked! I already guessed it had something to do with the context but didn't know how to change it... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to

[Proto-Scripty] Re: Animated Ajax Record Deletion

2009-07-08 Thread T.J. Crowder
Hi, > In this case var element = Event.findElement(ev); seems to return the > image and not the link. Any other way to fix this? Event#findElement has exactly the functionality you need, I'd give the docs[1] a good read. [1] http://prototypejs.org/api/event/findelement HTH, -- T.J. Crowder tj

[Proto-Scripty] Re: Animated Ajax Record Deletion

2009-07-08 Thread David Behler
Thanks! That worked! I'm still a beginner and trying to really get into Prototype...good to know people here are willing to help :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.

[Proto-Scripty] Re: IE 6.0.2900.2180.xpsp_sp2_rtm.040803-2158 Problem

2009-07-08 Thread AW GOOGLE
Andy Wenk schrieb: > Hi everybody, > > I am new to the list and this is my first post. > > Actually we have a problem wit the Internet Explorer > 6.0.2900.2180.xpsp_sp2_rtm.040803-2158. We are not able to localize > the problem and try now to figure out wheter it could be a Javascript > Problem

[Proto-Scripty] process further

2009-07-08 Thread chrysanthem
Hello On return from a ajax call with prototype, is it possible to send the return parameters to a function to be processed first and then write that return value to the designated element? Also where is the syntax on how to write the return values? I am having difficulty understanding what I ca

[Proto-Scripty] Re: process further

2009-07-08 Thread David Behler
I guess you would have to use Ajax.Request to process the returned value before updating the designated element. But I'm beginner and could be wrong here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype &

[Proto-Scripty] Re: process further

2009-07-08 Thread chrysanthe m
Hi David Thanks, but I think I one step further. I am assuming an Ajax.request() has happened, returned and what I am looking at to understand further is syntax like this: $('fullName').value = json.fullName; for an returned parameter fullName and an html element ID of fullName. I am wondering, ca

[Proto-Scripty] Re: process further

2009-07-08 Thread Douglas
Hello, all you have to do (I guess) is set a callback to onComplete. Something as follow: // onComplete callback's call function processJsonPart (myCoolVar) { // do something with your returned JSON return myCoolVarEvaluatedOrValidatedOrAnythingYouWant; } // here we call Ajax.request fun

[Proto-Scripty] Re: process further

2009-07-08 Thread Douglas
oops! 'foo' should be 'processJsonPart' On Thu, Jul 9, 2009 at 1:38 AM, Douglas wrote: > Hello, > all you have to do (I guess) is set a callback to onComplete. > Something as follow: > > // onComplete callback's call > function processJsonPart (myCoolVar) > { >    // do something with your retur

[Proto-Scripty] inline Vs block

2009-07-08 Thread lun.ashis
hi everyone !! actually this may not be the appropriate questions for you guys but i know you ppl can answer this question. Can anyone describe me why the >> cumulativeOffset << is different for the same element if we change its css display attribute to "INLINE" and "BLOCK" ? Before i was think