[Rails-spinoffs] Adding a new Sortable

2006-02-23 Thread Danger Stevens
Perhaps this is elementary, but I'm having trouble finding something in the documentation.  I'm attempting to create a page with a form for new data submission and below it a list (a Sortable) of the various records.  I'm unsure how to make the form so that it will automatically create a new elemen

Re: [Rails-spinoffs] suggestion $c()

2006-02-23 Thread Yehuda Katz
It only works in the svn version of Prototype. The current stable version does not have it.On 2/23/06, louis d walch < [EMAIL PROTECTED]> wrote: Awesome, I guess I missed that one. Thanks.     From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Yehuda Katz Sent

Re: [Rails-spinoffs] Insertion.Top

2006-02-23 Thread Farhan
My apologies the correct url is http://www.talaha.com/macnn/ test_insert.html Thank you. On Feb 21, 2006, at 4:22 PM, Whitcraft, Jon wrote: The url does not work. Jon Whitcraft Web Application Developer Online Services - Indianapolis Motor Speedway (317) 492-8623 -Original Message-

RE: [Rails-spinoffs] suggestion $c()

2006-02-23 Thread louis d walch
Awesome, I guess I missed that one. Thanks.     From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yehuda Katz Sent: Thursday, February 23, 2006 8:36 PM To: rails-spinoffs@lists.rubyonrails.org Subject: Re: [Rails-spinoffs] suggestion $c()   You can use the new $$

Re: [Rails-spinoffs] suggestion $c()

2006-02-23 Thread Yehuda Katz
You can use the new $$ with '.' example $$('.className') returns an array of all elements with the class name 'className'On 2/23/06, Louis Walch < [EMAIL PROTECTED]> wrote:i think it would be a good idea to map a shortcut to getElementsByClassName like the much loved $(). i think $c() seemsapplica

[Rails-spinoffs] suggestion $c()

2006-02-23 Thread Louis Walch
i think it would be a good idea to map a shortcut to getElementsByClassName like the much loved $(). i think $c() seems applicable. ___ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-sp

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Louis Walch
duh, ok. sorry and thanks for the help! > On 2/23/06, Louis Walch <[EMAIL PROTECTED]> wrote: >> whoops, sorry >> >> >> function displayPreviewIcon(){ >> inputs = getInputsByAttribute('fldtype','filelocation'); >> for(i=0; i < inputs.length; i++){ >>

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Todd Ross
On 2/23/06, Louis Walch <[EMAIL PROTECTED]> wrote: > whoops, sorry > > > function displayPreviewIcon(){ > inputs = getInputsByAttribute('fldtype','filelocation'); > for(i=0; i < inputs.length; i++){ > //Testing >

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Louis Walch
whoops, sorry function displayPreviewIcon(){ inputs = getInputsByAttribute('fldtype','filelocation'); for(i=0; i < inputs.length; i++){ //Testing inputs[i].style.backgroundColor = '#ff00ff';

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Todd Ross
On 2/23/06, Louis Walch <[EMAIL PROTECTED]> wrote: > the file is being included, it is in the top of my common.js > > i am getting the error before it does anything. could it be that my > common.js is not written in the OO style of js? > > here is the code; And ... how are you calling it? Todd __

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Louis Walch
the file is being included, it is in the top of my common.js i am getting the error before it does anything. could it be that my common.js is not written in the OO style of js? here is the code; document.getInputsByAttribute = function(attrib,val){ //Add-on to Prototype var child

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Todd Ross
On 2/23/06, Louis Walch <[EMAIL PROTECTED]> wrote: > i made a function which was a near duplicate of getElementsByClassName and > saved it as getInputsByAttribute and saved it in an external js file. > > but now i am getting "getInputsByAttribute can not be found" is there > something i need to do

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Louis Walch
i made a function which was a near duplicate of getElementsByClassName and saved it as getInputsByAttribute and saved it in an external js file. but now i am getting "getInputsByAttribute can not be found" is there something i need to do to make it part of prototype? > > > Louis Walch wrote: >>

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Cam McVey
Louis, In this senario, I usually add a class to the set of elements I'm interested in getting back to later on by doing a Element.addClassName() and then doing a getElementsByClassName() later on. You can remove the 'dummy' class later if you need to: Element.removeClassName() Hope this helps.

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Louis Walch
thanks rob, i will give input_.+ a shot. i use a custom attrib named fldtype for some input items and am hoping to assign different actions to each input based on that. > > > Louis Walch wrote: >> i would like to detect classnames of input_(ANYTHING) is this possible >> with getElementsByClass

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Robin Haswell
Louis Walch wrote: > i would like to detect classnames of input_(ANYTHING) is this possible > with getElementsByClassName? Looking at the source code you could do getELementsByClassName("input_.+");, although it's undocumented behaviour so it might mysteriously break after a prototype upgrade on

[Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Louis Walch
i would like to detect classnames of input_(ANYTHING) is this possible with getElementsByClassName? also, is tthere a way to get elements by attribute? or would that be too heavy on the load time? ___ Rails-spinoffs mailing list Rails-spinoffs@lists.ruby

RE: [Rails-spinoffs] reloading fragments of pages

2006-02-23 Thread Ryan Gahl
Perhaps. Very busy right now. :-) Time will tell. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maninder, Singh Sent: Thursday, February 23, 2006 9:32 AM To: rails-spinoffs@lists.rubyonrails.org Subject: RE: [Rails-spinoffs] reloading fragments of pages

Re: [Rails-spinoffs] reloading fragments of pages

2006-02-23 Thread Tarek Ziadé
On 2/23/06, Ryan Gahl <[EMAIL PROTECTED]> wrote: Todd is exactly right. What's also important to realize about this, is that when your DOM elements are destroyed by the update to innerHTML, any event handlers that were tied to them (onclick, etc..), are in danger of staying around in memory (especi

RE: [Rails-spinoffs] reloading fragments of pages

2006-02-23 Thread Maninder, Singh
Thanks once again Ryan. Are you planning to share your code? :) ___ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Re: [Rails-spinoffs] reloading fragments of pages

2006-02-23 Thread Tarek Ziadé
On 2/23/06, Nicolas <[EMAIL PROTECTED]> wrote: You may try to use Ajax.Updater with the evalScripts option enabled. thanks i am going to try that In the HTML code sent by the server, you'll have to include

RE: [Rails-spinoffs] reloading fragments of pages

2006-02-23 Thread Ryan Gahl
No it's something you would have to write. Protoype's unloadCache() happens on page unload... we're talking here about a single control being updated (not the whole page). So in a long-running AJAX application, the page itself may never get refreshed, there prototype would never call unloadCache()

Re: [Rails-spinoffs] reloading fragments of pages

2006-02-23 Thread Tarek Ziadé
On 2/23/06, Todd Ross <[EMAIL PROTECTED]> wrote: On 2/23/06, Tarek Ziadé <[EMAIL PROTECTED]> wrote:>  When the dom is reloaded, the drag/drop features reloads Droppable.drops> elements.I think this statement is the heart of your problem.  There's nothing active about scriptaculous (where you're get

RE: [Rails-spinoffs] reloading fragments of pages

2006-02-23 Thread Maninder, Singh
Ryan, Not related to this post, but you bring up a good point here. The dispose() method that you are talking about, is this something available in prototype or do we need to write it? Is it similar to unloadCache()? Doesn't prototype do the cleanups on every subsequent load? Please let me kno

RE: [Rails-spinoffs] reloading fragments of pages

2006-02-23 Thread Ryan Gahl
Todd is exactly right. What's also important to realize about this, is that when your DOM elements are destroyed by the update to innerHTML, any event handlers that were tied to them (onclick, etc..), are in danger of staying around in memory (especially if the handlers are closures which hold r

Re: [Rails-spinoffs] reloading fragments of pages

2006-02-23 Thread Nicolas
You may try to use Ajax.Updater with the evalScripts option enabled.In the HTML code sent by the server, you'll have to include

Re: [Rails-spinoffs] reloading fragments of pages

2006-02-23 Thread Todd Ross
On 2/23/06, Tarek Ziadé <[EMAIL PROTECTED]> wrote: > When the dom is reloaded, the drag/drop features reloads Droppable.drops > elements. I think this statement is the heart of your problem. There's nothing active about scriptaculous (where you're getting the Draggables/Droppables from) that wou

[Rails-spinoffs] reloading fragments of pages

2006-02-23 Thread Tarek Ziadé
Hello, I have a treeview, that works with scriptaculous in order to load the nodes dynamically. I also have in the main part of the page, a table with the list of elements. The lists of elements can be drag-dropped on the treeview in order to move them around (they are also draggable on other part