[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 wa...@wdstudio.com 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...

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

2010-07-17 Thread Quyết Tiến
I do this: $('content').select('a[rel=dhtmlwindow]').each(function(anchor) { anchor.observe('click', function() { alert (''); }); }) But it does not work again. On Jul 17, 8:29 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, So from now with tag a, I must use like this

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

2010-07-17 Thread T.J. Crowder
Hi, But it does not work again. It does for me, if I fix the various typos in the HTML: http://jsbin.com/eweyo4 Doesn't work is not really a useful description of a problem. When describing a problem for people to help with, these are the sorts of questions you typically want to answer:

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

2010-07-17 Thread Richard Quadling
On 16 July 2010 15:42, Quyết Tiến doquyett...@gmail.com wrote: yes On Jul 16, 8:42 pm, Richard Quadling rquadl...@gmail.com wrote: On 16 July 2010 07:37, Quyết Tiến doquyett...@gmail.com wrote: a href=# rel=dhtmlwindowcontent/a Is that a typo? a href=# rel=dhtmlwindowcontent/a -- You

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

2010-07-17 Thread Walter Lee Davis
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 On Jul 17, 2010, at 2:53 PM, Richard Quadling wrote: On 16 July 2010 15:42, Quyết Tiến

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

2010-07-16 Thread Quyết Tiến
yes On Jul 16, 8:42 pm, Richard Quadling rquadl...@gmail.com wrote: On 16 July 2010 07:37, Quyết Tiến doquyett...@gmail.com wrote: a href=# rel=dhtmlwindowcontent/a Is that a typo? a href=# rel=dhtmlwindowcontent/a -- You received this message because you are subscribed to the Google

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

2010-07-16 Thread T.J. Crowder
Hi, But it doesn't work, it returns href of tag a instead a object. Actually, it does work -- it's just that the default behavior of the HTMLAnchorElement when you try to use it as a string is to return the href (e.g., the result of its toString method), and `alert` does exactly that. You can

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

2010-07-16 Thread Quyết Tiến
So from now with tag a, I must use like this Object.prototype.toString.call(anchor)) to get object. On Jul 16, 10:42 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, But it doesn't work, it returns href of tag a instead a object. Actually, it does work -- it's just that the default

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

2010-07-16 Thread T.J. Crowder
Hi, So from now with tag a, I must use like this Object.prototype.toString.call(anchor)) to get object. No, you already _have_ an object. It's just that when you do this: alert(anchor); ...it's exactly like doing this: alert(anchor.toString()); ...because `alert` does an implicit