[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 kimbaudi
Hi, I know how to observe elements with class="test". However, I would like to know how I would be able to observe elements with class="test_1", class="test_2" and class="test_3" or class="first_test", class="second_test" and class="third_test". Here is my pastie url that observes elements with cla

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

2010-01-07 Thread kimbaudi
Hi, I have come up with 2 ways to create a modal dialog. The first way is to statically create the html with a style of display:none; and using event handlers to show/hide the html. The second way is to dynamically create the html using Prototype (new Element(tagName[, attributes]). Which way is "

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

2010-01-09 Thread kimbaudi
Hi, I have a hidden block element absolutely positioned to the bottom right of my webpage. I am trying to display this block element when I mouseover that area and hide this block element when I mouseout from that area using Effects.BlindUp and Effects.BlindDown. At first glance, my webpage seems t

[Proto-Scripty] Scriptaculous Effect.toggle on Prototype-extended elements

2010-01-10 Thread kimbaudi
Hi, I am able to use Effect.fade on Prototype-extended elements. So, instead of doing the following: Effect.Fade('id_of_element'); I can do this instead: $('id_of_element').fade(); However, when I try to use Effect.toggle on Prototype-extended elements, it doesn't work. This works: Effect.tog

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

2010-02-09 Thread kimbaudi
Hi, does anybody know how I can pause and resume Prototype's PeriodicalExecuter? Basically, I have a simple example script that periodically executes every 1 second, but I want there to be a 5 second delay for each 5th time the script is executing. Here is the link to the example script I posted

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

2010-04-29 Thread kimbaudi
Hi, I have a form with multiple text inputs (i.e. ... ) which all have Ajax.Autocompleter initialized. Now when I remove any of these autocompleting text inputs from the DOM, I want to stop observing events on these elements. However, Scriptaculous does not provide a way to unregister all the even

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

2008-10-27 Thread kimbaudi
Hi, I created a simple page that demonstrates setOpacity NOT working consistently between Firefox3, InternetExplorer7, Opera9, and Safari3: document.observe("dom:loaded", observeElement); function observeElement() {$('clickMe').observe('click', opacityDiv);} function opacityDiv() { va

[Proto-Scripty] $$() and Element.observe() question

2008-10-28 Thread kimbaudi
Hi, I am having trouble with using Element.observe() with $$(). If I have an element with id="id", I can do this: $('id').observe('click', function() {alert('clicked');}); However, if I have elements with class="class", I can't do this: $$('.class').observe('click', function() {alert('clicked')

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

2008-10-30 Thread kimbaudi
Hi, I was inspired by http://www.exit404.com/2005/57/unobtrusive-persistant-scriptaculous-effects to create a menu that would expand and contract the menu whenever I click on the menu header. Instead of using Effect.BlindDown and Effect.BlindUp, I decided to use Effect.toggle to toggle the unord

[Proto-Scripty] Effect.toggle('slide'), Effect.SlideUp, Effect.SlideDown is problematic in Opera

2008-10-31 Thread kimbaudi
Hi, if you check the demo for Effect.toggle('slide'), Effect.SlideUp, Effect.SlideDown using the Opera browser, you will notice that you get Effect.toggle('blind'), Effect.BlindUp, Effect.BlindDown effect instead. http://github.com/madrobby/scriptaculous/wikis/effect-toggle http://github.com/madr

[Proto-Scripty] Scriptaculous Effect.ScrollTo is being phased out? But it is not the same as Prototype's scrollTo

2008-11-01 Thread kimbaudi
Hey everybody, I noticed that Scriptaculous doesn't have documentation on Effect.ScrollTo anymore. (If you look at http://github.com/madrobby/scriptaculous/wikis, you will notice that Effect.ScrollTo is faded out and not linked to any documentation/demo). I guess it is being phased out, although

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

2008-11-03 Thread kimbaudi
Hi, I have an onclick event handler that will BlindUp a element if it is closed and BlindDown the element if it is opened. However, if I click on the event handling too quickly, the BlindUp and BlindDown effects do not work well: The text blinds up and down, but the background-color is no longer

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

2009-05-05 Thread kimbaudi
Hi, I am unable to get the height of the tag using Element.getDimensions although I can get the width of the tag fine. How can I get the height of the tag? I have my simple code pasted at http://pastie.org/468828. Here is the snippet of code below as well: function alertBodyDim() { /* $

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

2009-06-08 Thread kimbaudi
Hi, I have taken a look at the Prototype API and it says that document.viewport.getDimensions() should return the size of the viewport. I have created a simple page with a with width of 100px and height of 100px. I am hoping to alert the height of the browser window, but I get the height of the