[Proto-Scripty] Re: Help destroying many events on tr mouseenter and mouseleave

2011-07-10 Thread Douglas
until the on mouse move event to work out which element the mouse was over by using Event.element(event). This means that you don't need to attach or detach any event handlers, since there is always just the one on the table itself. Douglas -- You received this message because you are sub

Re: [Proto-Scripty] Re: click one checkbox will submit only one checkbox value (not the whole form) immediately

2010-03-11 Thread Douglas
Well, this has nothing to do with prototype, but you might use Prototype's Ajax.Request[1] to send only the data from the checked input (as follow): e.g.: function myMubmit(input) { new Ajax.Request(url, { method: 'post', parameters: input.name +'='+input.value, onSuccess: func

[Proto-Scripty] Re: Observing a checkbox

2009-08-13 Thread Douglas
checked === true is wrong you should check for ('checked' == $(input).checked || true == $(input).checked) ps: untested On Thu, Aug 13, 2009 at 10:53 AM, Jeztah wrote: > > What is the correct Cross browser way to observe a checkbox being > checked or not > > I am using > > $('hidenonlive').o

[Proto-Scripty] Re: get controls array

2009-07-23 Thread Douglas
Did you read the given references? On Thu, Jul 23, 2009 at 9:02 PM, diegoturriaga wrote: > > Well... first that all thanks for your reply! > > I'm trying to use a multidemensional javascript array... various > arrays of input controls of type checkbox > > I have 10 controls with name "myarray[1][

[Proto-Scripty] Re: get controls array

2009-07-23 Thread Douglas
I'd use classes instead // The '$$' reference: http://www.prototypejs.org/api/utility/dollar-dollar On Thu, Jul 23, 2009 at 6:50 PM, diegoturriaga wrote: > > I have something like that: > >

[Proto-Scripty] Re: DataGrid

2009-07-17 Thread Douglas
Cannot see the 'edit' attr working too. Very nice grid though. Thanks. On Fri, Jul 17, 2009 at 5:14 AM, Alex McAuley wrote: > > Nice data grid! ... what about inline editing of the cells ? .. i cant get > it to work on firefox in your demo > - Original Message - > From: "nirbhab" > To:

[Proto-Scripty] Re: Slider doesn't work anymore?

2009-07-16 Thread Douglas
Or, you can load the js files after you html > body is loaded/parsed. It's a good practice (IMO). http://www.w3.org/1999/xhtml";> My testing page On Thu, Jul 16, 2009 at 1:54 PM, ColinFine wrote: > > > > On Jul 16, 1:22 am, "bambell...@hotmail.com"

[Proto-Scripty] Re: Ajax response encoding type changing depending on windows (UTF-8) vs unix (ISO-8859-1)

2009-07-15 Thread Douglas
Prototype has _nothing_ to do with the response code. Your backend is sending the wrong encoding. Problably, you have not set the correct send headers. Are you using a PHP backend? If yes, maybe your local php.ini have default_charset set to utf-8 and the unix one has not, by default, php uses is

[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 (my

[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] Clarification on PUT method in Ajax.Request

2009-06-17 Thread P. Douglas Reeder
The documentation on Ajax.Request, for the "method" option, says: method 'post' The HTTP method to use for the request. The other widespread possibility is 'get'. As a Ruby On Rails special, Prototype also reacts to other verbs (such as 'put' and 'delete' by actually using 'pos

[Proto-Scripty] Re: $$ behavior in IE ?

2009-06-04 Thread Douglas
Hello, you cannot set the same ID more than once; You problably wanted to use classes instead of it; [example] hi bye document.observe('dom:loaded',function(){ console.log( $$('#gridRow').last().down().innerHTML ); }); [/example] I th

[Proto-Scripty] Re: JSON and Ajax.Updater

2009-06-03 Thread Douglas
arameters as myParameters ,onComplete: function(resp, json) {/* something wild :)*/} }); [/code] Cheers. On Wed, Jun 3, 2009 at 4:43 PM, Douglas wrote: > On Wed, Jun 3, 2009 at 2:31 PM, Celso wrote: >> >> var parameters = { ID : 17, Name : 'he

[Proto-Scripty] Re: JSON and Ajax.Updater

2009-06-03 Thread Douglas
On Wed, Jun 3, 2009 at 2:31 PM, Celso wrote: > > var parameters = { ID : 17, Name : 'hello' }; > >                new Ajax.Updater( >                                td.id >                                ,'../adicionar' >                                ,{asynchronous:true >                        

[Proto-Scripty] Re: Adding properties to native objects

2009-05-21 Thread P. Douglas Reeder
T.J. is correct, of course, that my original suggestion would make multiple copies of the functions. That's what I get for writing off the top of my head. If I understand correctly, what joe t. really want is something like: http://www.w3.org/TR/html4/loose.dtd";> SpecialDate var specialDa

[Proto-Scripty] Re: Adding properties to native objects

2009-05-20 Thread P. Douglas Reeder
You may want to use Crockford's factory pattern, rather than using any sort of constructor: function specialDateFactory() { var that = new Date(); that.isEaster = function () {return ...}, that.isLaborDay = function () {return ...}, return that; } You can get more sophisticated

[Proto-Scripty] Re: Changing href in onclick function

2009-05-20 Thread P. Douglas Reeder
To put what RobG said concretely, why can't you use: $('ph').observe('click', function(event) { if($('ph').href.endsWith('#')) { event.preventDefault(); new Ajax.Request("geturl.php", {

[Proto-Scripty] Re: Ajax.Updater and Field Validation conflict

2009-05-12 Thread Douglas
You should call your js functions within the 'onsubmit' attr from the form. Something like this: [code] ... var doThisHere = function(myForm) { var form = $(myForm); var valid1 = new Validation(form); if (valid1) alert('This form has been validated'); else

[Proto-Scripty] Re: Help! How to get document.body height using Element.getDimensions

2009-05-05 Thread Douglas
I hope this snippet helps :o) [code] var w = 0, h = 0; if (typeof(window.innerWidth) == 'number') { w = window.innerWidth; h = window.innerHeight; } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.client

[Proto-Scripty] Re: Recommended and Disrecommended DOM Methods

2009-04-19 Thread P. Douglas Reeder
I suppose compiling a list would be a useful exercise, and I can post it on the wiki for other newbies. On Apr 18, 5:56 am, "T.J. Crowder" wrote: > Hi, > > I don't think there's a list quite like what you're asking about, no, > but if you have a read through the API docs[1] and in particular t

[Proto-Scripty] Re: Client-side File Processing

2009-04-14 Thread P. Douglas Reeder
I created the following HTML file to test your function and get the following errors: 1) The file input element returns only the file's name, so I don't see how your function could load the file in. 2) Under Safari 3 and later, I get a "TypeError: Result of expression 'xmlDoc.load' [undefined]

[Proto-Scripty] Re: HTML Entity Handling with setValue

2009-03-18 Thread P. Douglas Reeder
When will documentation on Form.Element.setValue() be added to http://prototypejs.org/api/form/element ? > 4) Prototype way of doing it: > >     $(textArea).setValue(content.unescapeHTML()); --~--~-~--~~~---~--~~ You received this message because you are subscrib

[Proto-Scripty] Re: Should Text Nodes Be Wrapped With An Element?

2009-03-15 Thread P. Douglas Reeder
I'm not clear on what you're suggesting I do with the elements inside elements -- Element#update would replace them, and if you move the elements outside the elements it's no longer valid HTML (as I think you meant). I should have noted that elements with the class "toggle" are used to open

[Proto-Scripty] Re: Prototype IE 7 error

2008-10-03 Thread Douglas
I could not access any .js file there. You might check out the given permissions. On Fri, Oct 3, 2008 at 11:39 AM, ljungi <[EMAIL PROTECTED]> wrote: > > Hi, > > I' using protoype in combination with the great symfony framework, > everything worked fine, until now. I just got an email from an user

[Proto-Scripty] Re: Disable form submission

2008-09-17 Thread Douglas
On Wed, Sep 17, 2008 at 5:21 PM, Tokeiito <[EMAIL PROTECTED]> wrote: > this method form#disable()/enable() disables all form thats not what i'm > searching. > > I'm searching how to disable submission on Enter key. User still can edit > text in field, he still can submit form by clicking button, b