[Proto-Scripty] Extending a class

2009-11-13 Thread greg
Some kind soul out there has created a form unserialize method (below) that I would like to use. Being a newbie I can't figure out how to do that. My first kick at the can was Object.extend(Form.Methods, Form.Methods.unserialize); and to use it was: $(form1).unserialize(form1,data) but that

[Proto-Scripty] Re: Scope problem with prototype

2010-02-15 Thread greg
This is my first attempt at answering a question here, so use with caution... var max_Height = 0; $$('.ddBox').each(function(dd) { max_Height = Math.max(max_Height, dd.select('ol').invoke('getHeight').max()); }); $$('.ddBox').invoke('setStyle',

[Proto-Scripty] File Loading Best Practives

2010-03-19 Thread greg
would be any further ahead speed wise. The only thing I can think of is to keep a count of how many requests there are and when I've reached that many completions to build the form. That sounds a little flaky though. Any ideas out there? Thanks! Greg -- You received this message because you

[Proto-Scripty] Execute JavaScript within HTML Response to Ajax Request

2010-09-24 Thread Greg
Via Google search, I found this answer today here: http://stackoverflow.com/questions/278122/how-to-force-javascript-to-execute-within-html-response-to-ajax-request I have it half working. What I mean is, my response text comes back and updates my div perfectly with the HTML when evalScripts:

[Proto-Scripty] Create Option using prototype

2011-02-02 Thread greg
Hi folks, Is there a way using just new Element to create an Option element? To get it to work in FF and IE, I need to do the following: var o = new Element('Option', {'value': times[i], 'innerHTML': times[i]}); // for IE o.text = times[i]; // for FF This doesn't work in FF: var o = new

[Proto-Scripty] Re: Rails 3.1 - Prototype = WTF?

2011-03-15 Thread greg
I don't often post here, but I've been using Prototype extensively for the last 6 months. Not a day goes by when I don't say something to myself along the lines of Thank God for Prototype. Perhaps, had I started with J-Query, I'd have said the same thing about it - but I didn't, and I'd like to

[Proto-Scripty] Finding Class methods

2011-03-17 Thread greg
Hi, Within my script I'd like to get a list of methods defined within in a class created with Class.create(). If I do: var c = new MyShinyNewClass() console.log(c) I get a nice breakdown of variables and methods, and firebug differentiates the vars from the functions. If I do: for (m in c)

[Proto-Scripty] Re: Finding Class methods

2011-03-18 Thread greg
Doh! Thank you folks for pointing out the astonishingly simple answer. Sometimes I'm so stunned when something doesn't work, I don't see the obvious. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send

[Proto-Scripty] Re: Scope of variables when bindAsEventListener and Ajax Request

2011-04-17 Thread greg
The first parameter to bindAsEventListener is the context, then come the arguments. So I think you can just get rid of e in line function fetchData(e, jsonData), giving: function fetchData(jsonData) -- You received this message because you are subscribed to the Google Groups Prototype

[Proto-Scripty] Re: Prototype's evolution

2011-09-15 Thread greg
I think we'd all love to see Prototype be more popular, but does it really matter? It's here, it works, it works well and it's a great base on which to build complex apps. If the developers decide to not make any more upgrades we'd still have a great tool. I think of it as a house foundation

[Proto-Scripty] Re: Prototype and jQuery

2011-09-20 Thread greg
I've also written an API in Prototype, and I know it will be used in jQuery shops. I hope to not run into people not willing to make a few easy search/replace changes. It would be nice if there was a way for Prototype to not conflict. On Sep 20, 3:14 pm, kstubs kst...@gmail.com wrote: I've

[Proto-Scripty] Re: Prototype and jQuery

2011-09-21 Thread greg
Wouldn't that be as easy as a search and replace of $( in Prototype.js? You could always trying changing $( to Proto( and give it a whirl. But, any 3rd party stuff you have would need the same change. On Sep 21, 11:38 am, kstubs kst...@gmail.com wrote: Specifically:  How difficult would it be to

[Proto-Scripty] Re: ScrollTo function from menu item to iframe at the bottom of the same page

2011-11-18 Thread greg
Make sure Scriptaculous is loaded, then it's simply Effect.ScrollTo(element); But, if the iFrame isn't as tall as the page height, you may not get the top of the iFrame to the top of the page. It can't scroll beyond the end of the page content. -- You received this message because you are

[Proto-Scripty] Re: Image Uploader / Thumbnail creator

2012-07-03 Thread greg
Here's a little routine I use. The server sends back some minimal JSON code that I extract from the iframe that the upload form was posted to. This is a condensed version. If you need more of the code (html/js), let me know. If there's a more prototype-y way to do

[Proto-Scripty] Re: Object doesn't support property or method but then kinda works...

2013-01-16 Thread greg
Off the top of my head, I think the target of your form should be the id of the iframe. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit

[Proto-Scripty] AutoComplete Keyboard functions not working.

2010-06-11 Thread Greg Militello
Hi everyone, I am new at programming and I cannot figure out how to get the Autocomplete's keyboard functionality to work correctly. I am able to get Autocomplete function but when you hit the up and down arrow, the select does not change. Could someone take a look at my code and point out what I

[Proto-Scripty] Re: AutoComplete Keyboard functions not working.

2010-06-11 Thread Greg Militello
I actually was able to figure it out, It was actually working the whole time. If you add this bit of CSS code li.selected { background: teal ;color: black; } /code you can see what is actually see what is selected. Greg On Jun 10, 3:47 pm, Greg Militello greg.milite...@gmail.com wrote: Hi