Re: [Proto-Scripty] Re: Dynamic file upload input creation

2010-07-01 Thread Paul Kim
Yes, the way you would do this in prototype is to create an html element such as a button, link, input, etc and add an onclick event handler to that element. When the onclick event is invoked on that element, you would want to use Element.insert() to dynamically insert a new file input element to

Re: [Proto-Scripty] Do I stop observing events on element with Ajax.Autocompleter using Event.stopObserving()

2010-04-30 Thread Paul Kim
Thank you for your solution. Now my form removes Ajax.Autocompleter when I remove a form element. On Thu, Apr 29, 2010 at 11:49 PM, Sébastien Gruhier sgruh...@gmail.comwrote: Hi I'll add a Ajax.Autocompleter#release method like this. Ajax.Autocompleter.addMethods({ release: function() {

Re: [Proto-Scripty] How would I get a closer set of siblings?

2010-02-22 Thread Paul Kim
Hi Walter, if you want to get all similar elements up to but not including the next head, I would use Prototype's Element.nextSiblings() to loop through all elements with the same tagName and break when the tagName is different. Here is a function I created just now that would hopefully do what

Re: [Proto-Scripty] How would I get a closer set of siblings?

2010-02-22 Thread Paul Kim
; } On Mon, Feb 22, 2010 at 9:50 AM, Alex Wallace alexmlwall...@gmail.comwrote: Paul, one recommendation: store the results of element.nextSiblings() in a local variable outside of the loop. DOM traversals are pretty slow. Best, Alex On Mon, Feb 22, 2010 at 12:28 PM, Paul Kim kimba

Re: [Proto-Scripty] Re: How can I pause and resume PeriodicalExecuter?

2010-02-10 Thread Paul Kim
Hi, I was able to pause and resume PeriodicalExecuter without using your PeriodicalExecuter class. I ended up using the standard PeriodicalExecuter#stop method and resumed the PeriodicalExecuter by delaying the execution for 5 seconds using the Function#delay method and by binding it to the

Re: [Proto-Scripty] Multiple timed slideshows

2010-02-01 Thread Paul Kim
I don't know of any examples of what you are trying to achieve. However, it could be accomplished using PeriodicalExecuter and Effect.appear/Effect.fade. On Sun, Jan 31, 2010 at 12:16 PM, greyhound b...@greyhound-computing.comwrote: Hi everyone, I have been using the script library to create

Re: [Proto-Scripty] Re: Help with blindup/blinddown effect using mouseover/mouseout events

2010-01-13 Thread Paul Kim
for the blindDown. -- david On 12 jan, 20:31, Paul Kim kimba...@gmail.com wrote: Hi David, thank you for your response and what you explained is exactly what I'm trying to do. I have tried your code sample, but I get an error from the Firebug console: effectInExecution.cancel is not a function

Re: [Proto-Scripty] Re: Help with blindup/blinddown effect using mouseover/mouseout events

2010-01-12 Thread Paul Kim
Hi David, thank you for your response and what you explained is exactly what I'm trying to do. I have tried your code sample, but I get an error from the Firebug console: effectInExecution.cancel is not a function. Here is the code that I have used: http://pastie.org/775288. It seems that

Re: [Proto-Scripty] Question on performance and SEO optimization regarding javascript to create elements

2010-01-08 Thread Paul Kim
Thanks for your opinion. I think I will take the DOM approach as well. On Fri, Jan 8, 2010 at 1:12 AM, Alex McAuley webmas...@thecarmarketplace.com wrote: Some SEO experts will argue that google for example will mark you down for hidden content in a page as it may think you are trying to

Re: [Proto-Scripty] How can I observe elements with class=test_1, test_2, test_3 or first_test, second_test, third_test?

2009-12-31 Thread Paul Kim
Sorry, but I'm afraid your simple-but-not-smart way addresses the problem because I am observing elements with class, not id. On Thu, Dec 31, 2009 at 2:30 AM, Frédéric f...@gbiloba.org wrote: On jeudi 31 décembre 2009, kimbaudi wrote: Hi, I know how to observe elements with class=test.

Re: [Proto-Scripty] How can I observe elements with class=test_1, test_2, test_3 or first_test, second_test, third_test?

2009-12-31 Thread Paul Kim
That is a great solution if I have a few elements with class that starts with test_ or ends with _test. But what if I have 1,000 elements that start with test_ or ends with _test? Do you really want me to do this: $$(.'test_1', 'test_2', ... 'test_1000') or $$('first_test', 'second_test', ...

Re: [Proto-Scripty] How can I observe elements with class=test_1, test_2, test_3 or first_test, second_test, third_test?

2009-12-31 Thread Paul Kim
on the client Secondly. If you have to have 1000 elements on a single page that require observers -I- would go back to thee drawing board and rethink my application. Alex Mcauley http://www.thevacancymarket.com - Original Message - *From:* Paul Kim kimba...@gmail.com *To:* prototype

Re: [Proto-Scripty] How can I observe elements with class=test_1, test_2, test_3 or first_test, second_test, third_test?

2009-12-31 Thread Paul Kim
is a pastie to add onclick observers to elements with a class that has a suffix of _test: http://pastie.org/762433. Glad to know that Prototype supports CSS3 selectors for the $$ function. Cheers. On Thu, Dec 31, 2009 at 3:49 AM, Paul Kim kimba...@gmail.com wrote: Sorry, I was just suggesting

Re: [Proto-Scripty] setOpacity has no effect in IE8

2009-12-31 Thread Paul Kim
I do not experience your problem of having Element.setOpacity not working in IE8 w/o compatibility mode. Here is a pastie that demonstrates Element.setOpacity working in IE8: http://pastie.org/762888. If you view this in IE8 w/o compatibility mode, you will notice that the setOpacity makes the

[Proto-Scripty] Re: stopping the PeriodicalExecuter

2009-08-27 Thread Paul Kim
Wouldn't this work? var pe = new PeriodicalExecuter(function(pe) {outsideFunction();}, 3); pe.stop(); On Thu, Aug 27, 2009 at 1:06 AM, T.J. Crowder t...@crowdersoftware.comwrote: Hi, I've searched high low for this but I haven't been able to dig anything specific up about stopping the

[Proto-Scripty] Re: Help! Is it possible to tell which element I invoked without the use of id attribute

2009-07-15 Thread Paul Kim
li')[1]; and so on Or for(i=0;i=$$('#slidebtn li').length) { if(i==3) { alert('Got the 4th list element'); } } HTH Alex - Original Message - *From:* Paul Kim kimba...@gmail.com *To:* prototype-scriptaculous@googlegroups.com *Sent:* Wednesday, July 15, 2009 4:57 AM

[Proto-Scripty] Help! Unable to defer function to run when interpreter is idle

2009-07-15 Thread Paul Kim
Hi, I have been working to modify a fading slideshow image gallery script w/ controls, but I am having problems deferring a function to run when the interpreter is idle using Prototype's defer() method. Here is a snippet of my code and I want to defer the showSlide() function: var slideshow = {

[Proto-Scripty] Re: Help! Unable to defer function to run when interpreter is idle

2009-07-15 Thread Paul Kim
, but instead wanted to prevent the fade/appear effects from triggering when the image is currently undergoing a fade/appear effect. Do you know if this is even possible? - Paul On Wed, Jul 15, 2009 at 7:28 AM, Mike Glen mike.g...@mindsweep.net wrote: Paul Kim wrote: Basically

[Proto-Scripty] Help! Is it possible to tell which element I invoked without the use of id attribute

2009-07-14 Thread Paul Kim
Hi, I have a simple unordered list: ul id=slidebtn liimg src=img/1.gif //li liimg src=img/2.gif //li liimg src=img/3.gif //li liimg src=img/pause.gif //li /ul I would like to know if it is possible to determine the nth li element without the use of an id

[Proto-Scripty] Re: Why does document.viewport.getDimensions() not work without a DOCTYPE?

2009-06-08 Thread Paul Kim
I guess this mean that I must use DOCTYPES when using Prototype. I was expecting Prototype to work consistently whether or not there was a DOCTYPE present. - Paul On Mon, Jun 8, 2009 at 11:07 AM, Alex McAuley webmas...@thecarmarketplace.com wrote: This has been discussed many times before

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

2009-05-07 Thread Paul Kim
the window dimensions, not the body element. Some browsers make that harder than others. :-) -- T.J. On May 7, 5:48 pm, Paul Kim kimba...@gmail.com wrote: Hi T.J., thanks for pointing me to document.viewport. It returns the dimensions of the body element. - Paul K On Thu, May 7

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

2009-05-07 Thread Paul Kim
Hi T.J., I'm sorry for any confusion, but I was trying to get the dimension of the browser window this whole time. I misunderstood the body element dimension as being the same thing as the browser window dimension. - Paul K On Thu, May 7, 2009 at 10:02 AM, Paul Kim kimba...@gmail.com wrote

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

2009-05-06 Thread Paul Kim
: 1px solid red; background-color: yellow; } ...and the yellow background fills the viewport, even though the body doesn't. Fun, eh? -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On May 5, 5:25 pm, Paul Kim kimba

[Proto-Scripty] Re: Help! Clicking on onclick event handler too quickly breaks Effect.BlindUp/Effect.BlindDown

2008-11-04 Thread Paul Kim
Hi Baglan, Thanks for pointing me in the right direction. Now it works perfectly! Thank you! - Paul On Tue, Nov 4, 2008 at 4:45 AM, Baglan [EMAIL PROTECTED] wrote: Sure, there's a feature called 'queues': http://github.com/madrobby/scriptaculous/wikis/effect-queues You can queue the

[Proto-Scripty] Re: Effect.toggle slide doesn't work well with unordered/ordered list elements

2008-10-31 Thread Paul Kim
Thanks for the solution David. Do you have any idea why this worked for Opera when the ul element wasn't encapsulated inside a div element? - Paul On Fri, Oct 31, 2008 at 4:42 AM, david [EMAIL PROTECTED] wrote: Hi Paul, You'll have to change the HTML to: div class=menu h3

[Proto-Scripty] Re: Prototype's setOpacity does not work consistently in all browsers

2008-10-27 Thread Paul Kim
I don't think document.body.insert({bottom: newDiv}).setOpacity(0.5); is equivalent to document.body.insert({bottom: newDiv}); document.body.setOpacity(0.5); because the first one is setting newDiv with an opacity of 0.5 whereas the second one is setting body with an opacity of 0.5. What I'm

[Proto-Scripty] Re: Prototype's setOpacity does not work consistently in all browsers

2008-10-27 Thread Paul Kim
, setOpacity works the way it should. Thanks Tobie for your response. Without it, I don't think I would have caught that mistake. Sorry about that. - Paul On Mon, Oct 27, 2008 at 8:33 AM, Paul Kim [EMAIL PROTECTED] wrote: I don't think document.body.insert({bottom: newDiv}).setOpacity(0.5