[Proto-Scripty] Re: Element.select works wrong when select tag a

2010-07-18 Thread Quyết Tiến
I do it, thanks for your help. On Jul 18, 3:31 am, Walter Lee Davis wrote: > I think the OP was saying that it was a typo in the e-mail, not that   > the original code had that same mistake and he was expecting it to   > magically work anyway. Give the guy a little credit here... > > Walter > > O

[Proto-Scripty] Re: Weird IE8 bug for click events with Element.observe for 1.7_rc2

2010-07-18 Thread T.J. Crowder
Hi, So basically you're replacing a DOM0 handler (the onclick attribute) with a DOM2 handler (via #observe) the first time it's clicked. My guess based on what you're observing is that IE8 fires DOM0 handlers, and then goes and fires any DOM2 handlers the element has. That doesn't actually surpris

[Proto-Scripty] Re: Weird IE8 bug for click events with Element.observe for 1.7_rc2

2010-07-18 Thread orbiter
Thanks, that explains a lot. I do most of my coding on firefox and chrome and IE always throws me for a loop. I'll go with "return false" and let you know how it goes. On Jul 18, 8:48 am, "T.J. Crowder" wrote: > Hi, > > So basically you're replacing a DOM0 handler (the onclick attribute) > with a

[Proto-Scripty] Re: Weird IE8 bug for click events with Element.observe for 1.7_rc2

2010-07-18 Thread orbiter
"return false" didn't work but the timeout method did. Thanks for the help. On Jul 18, 9:38 am, orbiter wrote: > Thanks, that explains a lot. I do most of my coding on firefox and > chrome and IE always throws me for a loop. I'll go with "return false" > and let you know how it goes. > > On Jul 1

[Proto-Scripty] Re: Weird IE8 bug for click events with Element.observe for 1.7_rc2

2010-07-18 Thread T.J. Crowder
No worries. I'm not entirely surprised return false didn't work. Did you try Event.stop(event)? I'd give it no more than 50/50 odds... -- T.J. :-) On Jul 18, 5:45 pm, orbiter wrote: > "return false" didn't work but the timeout method did. Thanks for the > help. > > On Jul 18, 9:38 am, orbiter w

[Proto-Scripty] Re: Weird IE8 bug for click events with Element.observe for 1.7_rc2

2010-07-18 Thread orbiter
Event.stop(event) was actually one of the first things I tried right after I posted my original message but it didn't work. I think the only way to prevent the anomalous behavior is to wait until the first event bubbles all the way up without any DOM2 handlers in the way which is what your setTimeo

[Proto-Scripty] Re: Weird IE8 bug for click events with Element.observe for 1.7_rc2

2010-07-18 Thread T.J. Crowder
Thanks, good to know. -- T.J. :-) On Jul 18, 6:19 pm, orbiter wrote: > Event.stop(event) was actually one of the first things I tried right > after I posted my original message but it didn't work. I think the > only way to prevent the anomalous behavior is to wait until the first > event bubbles

[Proto-Scripty] Passing hashes to setStyle method

2010-07-18 Thread Zortag
According to the Prototype documentation concerning the class method Element.setStyle, the method takes "a hash of property-value pairs" as the parameter. And, indeed, the following works as expected ... $( 'elm_01' ).setStyle({height: '200px'}); so why doesn't the following work ... var