[Proto-Scripty] Re: Prototype Form.serializeElements
How 'bout something like var paramsA = Form.serializeElements( $(frm).getInputs('checkbox', typeA),true); var paramsB = Form.serializeElements( $(frm).getInputs('checkbox', typeB),true); var paramsC = Form.serializeElements( $(frm).getInputs('checkbox', typeC),true); var params = paramsA + '' + paramsB + '' + paramsC; Yeah... I know it's not as sexy as defining the array and running through an 'each' loop but I bet it would work :-) (With string concatenation, you could, of course, do it all in a single variable) Al On Dec 22, 11:27 am, Neede chugalu...@gmail.com wrote: Hello, I've run into a response performance problem with IE6. My form has a 4 scrollable tables that each contain up to 2000 check boxes (names: typeA, typeB, typeC, typeD). serialize() is taking a long time to process, so i was attempting to speed it up by only serializing the check boxes that I need by using: Form.serializeElements( $(frm).getInputs('checkbox', typeA), true); this works fine but i also want to serialize typeB and typeC. I need everything but typeD which happens to have the the greatest number of checkboxes. I tried creating an array for the check box names arChkBoxes = [ typeA, typeB, typeC]; var params = Form.serializeElements( $(frm).getInputs('checkbox', arChkBoxes ), true); Any help on the correct syntax or ideas on how to speed up the serialization is appreciated! -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Re: Pulse effect sometimes stopping on darkened version
You might find it easier to set up queues if you don't use inline code. Create an observer in the head of your page, and then you can keep all your code in one place and integrate the effects so they are aware of each other's existence and state. document.observe('dom:loaded', function(){ Element.addMethods({ attractAttention: function(obj){ new Effect.Pulsate(obj, { pulses: 3, duration: 1, queue: this.id}); } }); $('parentDiv').observe('mouseover',function(evt){ var elm = evt.element(); elm.identify(); //patch anything you didn't ID switch(elm.id){ case 'foo': $('foo_target').attractAttention(); break; case 'bar': $('bar_target').attractAttention(); break; case 'baz': $('baz_target').attractAttention(); break; default: break; } }); }); Hope this helps, Walter On Dec 24, 2009, at 2:19 AM, evilC wrote: As an afterthought, I guess it is by design. If you trigger it, it probably uses the current state as a starting point. I guess what is needed is a way to tell it to stop the current animation if triggered again before it finishes, or ignore subsequent requests until the current animation is complete. I tried queueing effects, but had no luck. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com . To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en . -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: Pulse effect sometimes stopping on darkened version
Thanks walter, though I am not sure I understand that code. if the identify command assigns and ID, it returns it, but the code throws it away then does a switch on the id on the next line. It also appears that maybe I missed something about how queue works if you are passing it the id of the element. I will have to look into it, thanks muchly for your input. On Dec 24, 4:16 pm, Walter Lee Davis wa...@wdstudio.com wrote: You might find it easier to set up queues if you don't use inline code. Create an observer in the head of your page, and then you can keep all your code in one place and integrate the effects so they are aware of each other's existence and state. document.observe('dom:loaded', function(){ Element.addMethods({ attractAttention: function(obj){ new Effect.Pulsate(obj, { pulses: 3, duration: 1, queue: this.id}); } }); $('parentDiv').observe('mouseover',function(evt){ var elm = evt.element(); elm.identify(); //patch anything you didn't ID switch(elm.id){ case 'foo': $('foo_target').attractAttention(); break; case 'bar': $('bar_target').attractAttention(); break; case 'baz': $('baz_target').attractAttention(); break; default: break; } }); }); Hope this helps, Walter On Dec 24, 2009, at 2:19 AM, evilC wrote: As an afterthought, I guess it is by design. If you trigger it, it probably uses the current state as a starting point. I guess what is needed is a way to tell it to stop the current animation if triggered again before it finishes, or ignore subsequent requests until the current animation is complete. I tried queueing effects, but had no luck. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com . To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com . For more options, visit this group athttp://groups.google.com/group/prototype-scriptaculous?hl=en . -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Re: Pulse effect sometimes stopping on darkened version
Identify assigns an ID to the element if none exists, and that ID will persist until the page is done processing. Basically, it's a throw- away line to ensure that if the element that fired the event doesn't have an ID, the rest of your code doesn't go sproing. You could just as easily throw in an outer if(elm.id) test wrapped around the inner parts. Queue works by allowing you to define as many different queues as you like, and for each queue, stacking up the effects that are fired within it so that they have to complete before another effect can begin. By passing the ID of the element as the queue name, you give each element its own stack of effects, keeping another effect from messing with it and giving each effect time to complete fully. Walter On Dec 24, 2009, at 3:00 PM, evilC wrote: Thanks walter, though I am not sure I understand that code. if the identify command assigns and ID, it returns it, but the code throws it away then does a switch on the id on the next line. It also appears that maybe I missed something about how queue works if you are passing it the id of the element. I will have to look into it, thanks muchly for your input. On Dec 24, 4:16 pm, Walter Lee Davis wa...@wdstudio.com wrote: You might find it easier to set up queues if you don't use inline code. Create an observer in the head of your page, and then you can keep all your code in one place and integrate the effects so they are aware of each other's existence and state. document.observe('dom:loaded', function(){ Element.addMethods({ attractAttention: function(obj){ new Effect.Pulsate(obj, { pulses: 3, duration: 1, queue: this.id}); } }); $('parentDiv').observe('mouseover',function(evt){ var elm = evt.element(); elm.identify(); //patch anything you didn't ID switch(elm.id){ case 'foo': $('foo_target').attractAttention(); break; case 'bar': $('bar_target').attractAttention(); break; case 'baz': $('baz_target').attractAttention(); break; default: break; } }); }); Hope this helps, Walter On Dec 24, 2009, at 2:19 AM, evilC wrote: As an afterthought, I guess it is by design. If you trigger it, it probably uses the current state as a starting point. I guess what is needed is a way to tell it to stop the current animation if triggered again before it finishes, or ignore subsequent requests until the current animation is complete. I tried queueing effects, but had no luck. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com . To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com . For more options, visit this group athttp://groups.google.com/group/prototype-scriptaculous?hl=en . -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com . To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en . -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.