[Proto-Scripty] Protoype technique? Fire a function and get a call back?

2010-09-15 Thread BrentNicholas
This has to have been solved before or I'm just not thinking about this right. To start, I'm using version 1.6.1. In short I'm looking to fire off a function after another has completed. (onComplete equvilent) I'll show what I've got so far to better illustraight what I'm trying to do. 1) I reg

[Proto-Scripty] Re: Protoype technique? Fire a function and get a call back?

2010-09-16 Thread BrentNicholas
arantee you they provide a means of > hooking into it -- that's absolutely basic functionality. > > HTH, > -- > T.J. Crowder > Independent Software Consultant > mail: tj / crowder software / com > web: www / crowder software / com > > On Sep 15, 8:05 pm, BrentNicho

[Proto-Scripty] adding InPlaceEditor to each table cell

2010-10-27 Thread BrentNicholas
Hi all, I've been wrestling with this for a little bit now and figure it's time to ask for help. I can't seem to find anything on the web. I have a dynamicly generated table, I want to have an InPlaceEditor instance on each table cell. From what I can tell you need to do a 'new' object on it for

[Proto-Scripty] Re: adding InPlaceEditor to each table cell

2010-10-28 Thread BrentNicholas
Have you looked at TableKit for this? It's remarkably easy to add to a   > table, static or dynamic, all you do is ad the classname editable to   > your table head above the column you want to edit. > > Walter > > On Oct 27, 2010, at 6:34 PM, BrentNicholas wrote: > > > &

[Proto-Scripty] registering observers with classes using $$

2009-04-01 Thread BrentNicholas
Hello all, I found that the getElementsByClassName had been depricated so I'm trying to use $$ as was suggested. I'm a bit stuck though. The goal is to have clicking on any link with a class of 'classProjectsEditA' and have it trigger the function editProjectRecord. After that I'll get the id of

[Proto-Scripty] Re: registering observers with classes using $$

2009-04-01 Thread BrentNicholas
Ah, that did it... thank you. BN On Apr 1, 11:59 am, Hector Virgen wrote: > $$() uses CSS selectors, so you must pass in a CSS rule. Try this: > $$('a.classProjectsEditA').invoke('observe', 'click', editProjectRecord); > > -Hector > > On

[Proto-Scripty] Does prototype expire?

2009-04-07 Thread BrentNicholas
Hi all, I've noticed an odd thing on a project I'm building. It's all in 1.6.0.3 I noticed that the pages work just fine (ajax.request, Event.observe, and all), however if I let the browser sit for about 10mins (have not counted exactly), the buttons tied to functions though 'Event.observe' sto

[Proto-Scripty] Re: Does prototype expire?

2009-04-08 Thread BrentNicholas
; > }); > > Now it doesn't matter at all what you do with #bar and #baz -- you can   > replace them wholesale, and as long as there's something in the #foo   > div with those IDs at the time that a click happens, the function will   > Just Work™. > > Walter

[Proto-Scripty] Re: Does prototype expire?

2009-04-08 Thread BrentNicholas
ion "alive". > > Walter > > On Apr 8, 2009, at 10:51 AM, BrentNicholas wrote: > > > > > I have one thing I can chase down, but open to ideas.- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~

[Proto-Scripty] Re: event handling on ajax.request. how to add new event.observes when new data loads

2009-04-29 Thread BrentNicholas
I personally do something like this, though I have to wonder is it bad practice? I get the content with a request and use the callbacks to do what I need, seems to work fine. Though I wonder about observer clean up since I don't unregister them anywhere. function getSelectsForm() { new Aja

[Proto-Scripty] Event.observe

2009-04-29 Thread BrentNicholas
Hi all, So I posted about this before but am still having troubles with Event.observe flaking out on me after a period of time. Here's the situation: The page runs and init's the app with: document.observe("dom:loaded", init); init() fires off: getSelectsForm() As you can see (below)

[Proto-Scripty] Re: Event.observe

2009-04-29 Thread BrentNicholas
events attached. > > -- > > http://positionabsolute.net > > On Apr 29, 2:59 pm, BrentNicholas wrote: > > > > > Hi all, > > > So I posted about this before but am still having troubles with > > Event.observe flaking out on me after a period of time. > >

[Proto-Scripty] Catch (Event or Transport) best practice?

2009-05-27 Thread BrentNicholas
Hi all, So I'm wondering what is best practice. I've got a table that users can click a row and get sent to an edit screen. I'm also sending the users to the same edit screen after data inserts. I'd like to use the same function to handle this. However, when you click the row it returns an eve

[Proto-Scripty] Re: Catch (Event or Transport) best practice?

2009-05-28 Thread BrentNicholas
t); > > } > > ... > > Event.observe(therow, 'click', function(event) { >     doTheEditThing(this.id); > > }); > > FWIW, > -- > T.J. Crowder > tj / crowder software / com > Independent Software Engineer, consulting services available > > O

[Proto-Scripty] Re: Event.observe best practice

2008-09-08 Thread BrentNicholas
ing like: > > > document.observe("dom:loaded", function() { > > > var links = $$('.links'); > > >        links.each(function(w) { > > >            w.observe('click', function(e) { > > >                var linkId = this.id; &g

[Proto-Scripty] multipart/form-data and prototype

2008-09-17 Thread BrentNicholas
I've read that Prototype can not seralize files that have been selected for upload in the form. Found this out the hard way "Hrmm. Every thing else loaded... where's my file?" Is this still the case? I've read that most people do an iFrame solution. Anyone have other ideas? Thanks for your

[Proto-Scripty] Re: multipart/form-data and prototype

2008-09-17 Thread BrentNicholas
an XHR request.  As you noted you can keep a > stateful web app and load the files via an off screen  IFRAME.  This > is the best approach while sticking to DHTML, there are more advanced > solutions using a Flash object but thus requiring your users to have > the plugin. > >

[Proto-Scripty] order of operations

2008-09-18 Thread BrentNicholas
I was going to ask another question, but in tying it out I realised there is a more fundamental question here.. Q: within a function, do the statements run in order? if one statement is running will it move on to the next? I faintly recall reading something about js not paying attention to order.

[Proto-Scripty] Re: order of operations

2008-09-18 Thread BrentNicholas
Maybe I should check up on my old posts... Matt answered it quite well here... http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/ffd60dfc2a95899a?hl=en Thanks Matt! On Sep 18, 10:23 am, BrentNicholas <[EMAIL PROTECTED]> wrote: > I was going to ask another

[Proto-Scripty] Re: multipart/form-data and prototype

2008-09-18 Thread BrentNicholas
ctory, and the name of > input is the property of the form object that contains the path to > this file. > > On Sep 17, 2:37 pm, BrentNicholas <[EMAIL PROTECTED]> wrote: > > > > > Matt, > > > Thanks for the reply. Yeah, I found that js can't get at the f

[Proto-Scripty] Re: order of operations

2008-09-18 Thread BrentNicholas
David, The answer Matt had got me started, but I'm wondering if the called template saving the info firing javascript at the end is enough, or is there is a way to incorporate the onSucess/onComplete features into it to be a little more robust. I ended up doing this: function updateStationDetai