[Rails-spinoffs] Adding my own extensions with Elements.addMethods()

2008-02-07 Thread broberts
When I add my own extensions to DOM elements, is there a way to only add my extensions to the specific types of DOM elements (e.g. SELECT) to which my extensions apply or are intended to operate? Based on the Prototype API documentation (http://prototypejs.org/learn/ extensions), it appears that

[Rails-spinoffs] Re: Adding my own extensions with Elements.addMethods()

2008-02-07 Thread broberts
, broberts [EMAIL PROTECTED] wrote: When I add my own extensions to DOM elements, is there a way to only add my extensions to the specific types of DOM elements (e.g. SELECT) to which my extensions apply or are intended to operate? Based on the Prototype API documentation (http

[Rails-spinoffs] Elements.addMethods()... what about specific types of INPUT elements?

2008-02-07 Thread broberts
What about using Elements.addMethods() to extend specific types of INPUT elements such as text, radio, checkbox, hidden, etc? Is this possible? The Prototype API documentation (http://prototypejs.org/api/element/ addMethods) does not appear to address this, but I could be overlooking it. Help!

[Rails-spinoffs] Re: Elements.addMethods()... what about specific types of INPUT elements?

2008-02-07 Thread broberts
I understand that. However, what if I only want to extend a specific type of INPUT tag (e.g. RADIO, CHECKBOX or TEXT) and not every type of INPUT tag? On Feb 7, 4:30 pm, kangax [EMAIL PROTECTED] wrote: Just specify the tagName: Element.addMethods('input', { isNumeric: function(element) {

[Rails-spinoffs] Re: Elements.addMethods()... what about specific types of INPUT elements?

2008-02-08 Thread broberts
differentiation. Best, kangax On Feb 7, 5:40 pm, broberts [EMAIL PROTECTED] wrote: I understand that. However, what if I only want to extend a specific type of INPUT tag (e.g. RADIO, CHECKBOX or TEXT) and not every type of INPUT tag? On Feb 7, 4:30 pm, kangax [EMAIL PROTECTED] wrote

[Rails-spinoffs] Form.Observer causes expanded select box to close in Firefox 2.x

2008-02-14 Thread broberts
In Firefox 2.x, Form.Observer causes an expanded select box to collapse before a selection can be made. Is there any work around for this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Spinoffs

[Rails-spinoffs] Danger Will Robinson...DOM and JavaScript object extension using Prototype...help, Prototype...

2008-02-18 Thread broberts
I've found that one of the biggest arguments against Prototype and similar frameworks/libraries is the potential pitfalls of extending core and client-side JavaScript. One component of this argument is the risk of name collisions or different programmers overwriting each other's custom

[Rails-spinoffs] Form.Element.disable() shifts docus

2008-03-26 Thread broberts
I've found in Firefox 2.x, using Form.Element.disable() shifts the focus from the current form element somewhere else in the document (possibly to the disabled form element right before it's disabled). The effect is that the BLUR event is fired on the current form element when

[Rails-spinoffs] Form.Element.disable() shifts focus in some browsers...why?

2008-03-26 Thread broberts
I've found in Firefox 2.x, using Form.Element.disable() shifts the focus from the current form element somewhere else in the document (possibly to the disabled form element right before it's disabled). The effect is that the BLUR event is fired on the current form element when

[Rails-spinoffs] Re: Form.Element.disable() shifts focus in some browsers...why?

2008-03-26 Thread broberts
Justin, Kangax is on the money with his response. Form.Element.disable() is stealing focus from the current form element. On Mar 26, 3:59 pm, Justin Perkins [EMAIL PROTECTED] wrote: On Wed, Mar 26, 2008 at 3:55 PM, kangax [EMAIL PROTECTED] wrote: You could apply this

[Rails-spinoffs] Re: Form.Element.disable() shifts focus in some browsers...why?

2008-03-26 Thread broberts
Kangax, In this case, applying a patch is synonymous with modify the source code [of Prototype], correct? On Mar 26, 3:55 pm, kangax [EMAIL PROTECTED] wrote: You could apply this patchhttp://dev.rubyonrails.org/ticket/11214 - kangax On Mar 26, 4:37 pm, broberts [EMAIL PROTECTED] wrote

[Rails-spinoffs] Re: Form.Element.disable() shifts focus in some browsers...why?

2008-03-26 Thread broberts
Justin, Thanks. Yes, but as Kangax goes on to say in the trac ticket...There's no native way to check if element has focus. It can be done programatically - using focus/blur events (to keep track of element's state), but that's quite problematic in this case. On Mar 26, 5:11 pm, Justin Perkins

[Rails-spinoffs] responseJSON is null when content-type is application/json

2008-04-14 Thread broberts
In Firefox 2.x and IE6 (the browsers I've tested in thus far), the responseJSON property of the Ajax.Response object is null when I set the response content-type to application/json. However, when I set the response content-type to text/javascript, the responseJSON property actually contains the

[Rails-spinoffs] Re: responseJSON is null when content-type is application/json

2008-04-14 Thread broberts
{ response: { status: ok, purpose: user, rtncod: 1234, body: It worked } } On Apr 14, 3:13 pm, Michael Stillwell [EMAIL PROTECTED] wrote: On Apr 14, 6:35 pm, broberts [EMAIL PROTECTED

[Rails-spinoffs] Re: responseJSON is null when content-type is application/json

2008-04-14 Thread broberts
; see: http://beebo.org/scratch/test.html which Ajax.Requests: http://beebo.org/scratch/test.php --M. On Apr 14, 9:53 pm, broberts [EMAIL PROTECTED] wrote: { response: { status: ok, purpose:user, rtncod: 1234

[Rails-spinoffs] Re: responseJSON is null when content-type is application/json

2008-04-14 Thread broberts
, broberts [EMAIL PROTECTED] wrote: Yes, the code on your server works for me. Though I didn't seem to me that it would make any difference, I had a quick thought that it might be that I was using the GET method rather than the POST method. However, changing the method had no effect. I'm

[Rails-spinoffs] Re: responseJSON is null when content-type is application/json

2008-04-15 Thread broberts
:00 am, broberts [EMAIL PROTECTED] wrote: I cannot find any reference to 'defaultchartype' in my config file. However, the Apache config starts out with a number of AddType declarations that look promising... AddType text/plain .java AddType text/xml .xml AddType text/x-hdml .hdml

[Rails-spinoffs] Re: responseJSON is null when content-type is application/json

2008-04-15 Thread broberts
is a different story), though Apache does have lots of modules that do lots of things and maybe transcoding is more necessary on AS/400... (Does it use an unusual character set?) --M. On Apr 14, 11:00 pm, broberts [EMAIL PROTECTED] wrote: I cannot find any reference to 'defaultchartype

[Rails-spinoffs] Re: responseJSON is null when content-type is application/json

2008-04-15 Thread broberts
, Brian Williams [EMAIL PROTECTED] wrote: Just stumbled on something that might just be a lead in the right direction. http://forums.oracle.com/forums/thread.jspa?threadID=637706 On Tue, Apr 15, 2008 at 10:01 AM, broberts [EMAIL PROTECTED] wrote: Tobie, Thanks for your help. My Web server

[Rails-spinoffs] Re: responseJSON is null when content-type is application/json

2008-04-15 Thread broberts
that flows through it (adding headers is a different story), though Apache does have lots of modules that do lots of things and maybe transcoding is more necessary on AS/400... (Does it use an unusual character set?) --M. On Apr 14, 11:00 pm, broberts [EMAIL PROTECTED] wrote: I cannot find any

[Rails-spinoffs] Re: responseJSON is null when content-type is application/json

2008-04-15 Thread broberts
not uncompress the response. try running # wget -O -http://your.address/here| gunzip - It is rather unprobable situation, but it's always worth to test it. -- Regards, Szymon Wilkołazki broberts wrote: Michael, Do you mean Does the AS/400 use an unusual character set? Well, when it comes

[Rails-spinoffs] Does String.evalScripts() work on well-formed script tags?

2008-04-21 Thread broberts
Does String.evalScripts() work when the opening SCRIPT tag of a SCRIPT block contains common attributes? I've tried and it does not appear to be working. Here's an example: script type=text/javascript charset=ISO-8859-1 language=JavaScript //![CDATA[ !-- alert('look! it works!'); //--

[Rails-spinoffs] Re: Does String.evalScripts() work on well-formed script tags?

2008-04-21 Thread broberts
to) in the documentation on String.evalScripts, since it appears that the exact same concern applies in both cases. On Apr 21, 4:28 pm, broberts [EMAIL PROTECTED] wrote: Does String.evalScripts() work when the opening SCRIPT tag of a SCRIPT block contains common attributes? I've tried

[Rails-spinoffs] Re: Does String.evalScripts() work on well-formed script tags?

2008-04-21 Thread broberts
Do you guys need some help keeping the documentation updated? Let me know. I'd be glad to chip in. I really think documentation is a large part of what makes or breaks a JavaScript framework. On Apr 21, 6:04 pm, broberts [EMAIL PROTECTED] wrote: I answered my own question

[Rails-spinoffs] Re: Does String.evalScripts() work on well-formed script tags?

2008-04-22 Thread broberts
Thanks. On Apr 21, 10:57 pm, jdalton [EMAIL PROTECTED] wrote: Post your documentation requests via a ticket in LightHouse:http://www.prototypejs.org/contribute The error your speak of has been addressed via this patch (though it is not in the core

[Rails-spinoffs] Get a reference to the BODY tag node with no ID or class attribute

2008-04-23 Thread broberts
Is there a way to get a reference to the BODY tag node in the DOM if it has no class or ID attribute by which to select it? I want to insert a dynamically created node right before the closing body tag. Here's where I was going, but I'm not sure how to reference the BODY tag node. var body_tag

[Rails-spinoffs] Re: Get a reference to the BODY tag node with no ID or class attribute

2008-04-23 Thread broberts
Just document.body? I was thinking Prototype might have a cross- browser compatible method... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Spinoffs group. To post to this group, send email to

[Rails-spinoffs] Re: Get a reference to the BODY tag node with no ID or class attribute

2008-04-23 Thread broberts
overcome. On Apr 23, 4:48 pm, Brian Williams [EMAIL PROTECTED] wrote: er... couldn't you just do something like... var speaker_div = new Element('div', { 'id': 'my_div', 'style': 'width: 1px; height: 1px;' }) document.write(speaker_div) ? On Wed, Apr 23, 2008 at 5:44 PM, broberts [EMAIL

[Rails-spinoffs] Re: Get a reference to the BODY tag node with no ID or class attribute

2008-04-23 Thread broberts
Sorry.. Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Spinoffs group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to

[Rails-spinoffs] Re: Get a reference to the BODY tag node with no ID or class attribute

2008-04-24 Thread broberts
Thanks kangax. Thankfully I'm not trying to insert into an iframe this time around, but Ive taken note of the patch in case I do in the future. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Spinoffs

[Rails-spinoffs] __method.apply throwing error in IE6/7

2008-05-21 Thread broberts
I'm working with a situation that is specific to IE 6/7 where I receive a JavaScript error when the Prototype __method.apply function is invoked. Here's the error location and call stack a la Nikhil's Web Development helper... Microsoft JScript compilation error Syntax error Error Location and

[Rails-spinoffs] Re: __method.apply throwing error in IE6/7

2008-05-21 Thread broberts
IE6/7... the built-in JavaScript error reporting shows Syntax error --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Spinoffs group. To post to this group, send email to