i will ass ^ $
no need to go looping
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send
kojilab wrote:
Hi
I have an object with a method I call run that iterates over some form
elements.
I want to be able to execute a method of that object on each element.
But when I use this in the function within the each() statement,
obviously the this doesn't correspond to the object
this patch doesn't solve the issue entirely
if you have a child element with the id=parentNode
and the parent element tries element.parentNode it will return the
child with the id parentNode.
bummer.
--~--~-~--~~~---~--~~
You received this message because you are
http://dev.rubyonrails.org/ticket/11092
updated the ticket with an alternative fix which works for everything
except
child elements with duplicate id's.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype:
Hi Ken and Jon
Thanks for the info. Since I am not super familiar with the object
model in prototype, what would be the full code to call this
doSomething method within the each() function
Thanks again
On Feb 12, 12:28 pm, Ken Snyder [EMAIL PROTECTED] wrote:
kojilab wrote:
Hi
I have an
woopsie *add, and ticket updated thanks Ken!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group,
John-David Dalton wrote:
ticket + patch for the bug:
http://dev.rubyonrails.org/ticket/11092
Spiffy use of clone. Won't the line /name|id/.test(name) catch
attributes such as myid? Would ['name', 'id'].include(name) be
better? Or you could just add ^ and $.
- Ken
For further info: http://prototypejs.org/api/function/bind
- Jon L.
On Feb 12, 2:24 pm, Jon L. [EMAIL PROTECTED] wrote:
You can use the bind method.
this.formElements.each(function (el, index) { ... }.bind(this));
- Jon L.
On Feb 12, 2:05 pm, kojilab [EMAIL PROTECTED] wrote:
Hi
ticket + patch for the bug:
http://dev.rubyonrails.org/ticket/11092
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To
No I take that back, I think identity is susceptible to the same
problem.
On Feb 12, 12:42 pm, Doctuh [EMAIL PROTECTED] wrote:
Something I forgot to add: using the .identify() method on the form
avoids this problem entirely.
--~--~-~--~~~---~--~~
You received
You may be better treating id as a property (or, elem.id) vs.
attribute.
'id' isn't a member of the attributes object in FF; which, I'd assume,
has at least some influence on getAttribute (maybe not).
- Jon L.
On Feb 12, 1:16 pm, Ken Snyder [EMAIL PROTECTED] wrote:
Doctuh wrote:
...
form
Something I forgot to add: using the .identify() method on the form
avoids this problem entirely.
On Feb 12, 12:37 pm, Doctuh [EMAIL PROTECTED] wrote:
My first post. This is to document a tricky thing I found while using
Element.readAttribute() on a form. This post is to help the next
person
My first post. This is to document a tricky thing I found while using
Element.readAttribute() on a form. This post is to help the next
person looking for an answer on it.
ex:
form id=foo
input type=hidden name=id' value=bar /
/form
If you have a form with a hidden form element named 'id', and
BTW, your example in IE6 produces following results:
for click:
Left click: You clicked with your button. Event.button = 0 and Event.which
= undefined
Right and middle click: no effect, as expected
for mousedown, as expected:
Left click: You clicked with your Left button. Event.button = 1 and
On 12/02/2008, artemy tregoubenko [EMAIL PROTECTED] wrote:
You'll be surprised that click _can_ be toggled via keyboard (FF, Opera
for sure). You may easily test this.
And my first example shows how isLeftClick is broken in IE6. I can't
forget about IE6.
Ah. Yes. on clickable objects
On 12/02/2008, artemy tregoubenko [EMAIL PROTECTED] wrote:
I don't want to break keyboard navigation only because of IE problem.
mousedown and click are both non-keyboard events.
but click is only for left button.
This is true for IE (7 on WinXPSP2) and FF (2.0.0.1 on WinXPSP2).
Here is a
On 2/12/08, Richard Quadling [EMAIL PROTECTED] wrote:
On 12/02/2008, artemy tregoubenko [EMAIL PROTECTED] wrote:
You'll be surprised that click _can_ be toggled via keyboard (FF, Opera
for sure). You may easily test this.
And my first example shows how isLeftClick is broken in IE6. I
17 matches
Mail list logo