I looked at the code and it seems that readAttribute has some extra
plumbing for IE but other than that it works basically as you would
expect.
On May 19, 5:16 pm, patrick patrick99...@gmail.com wrote:
Hi,
I was looking over the API docs, and saw readAttribute, and thought to
myself: I have
I looked at the code and it seems that readAttribute has some extra
plumbing for IE but other than that it works basically as you would
expect.
Yes, but my question was, is it safe for me to be doing x.id,
x.style ?
Or is it recommended to use readAttribute to get those values?
-patrick
--
Yes, but my question was, is it safe for me to be doing x.id,
x.style ?
For *reflected* attributes like `id` and `className`, and for `style`
which isn't really an attribute (although its values are drawn from an
attribute, they're parsed), yes. Those are consistent cross-browser.
(With regard
You are trying to get the value of that tag, not an attribute.
To do that, use these:
$('tag'),getValue();
Or its shortcut:
$F('tag');
http://api.prototypejs.org/dom/form/element/getvalue/
-yaz
On May 10, 6:40 am, vtsuper vtsu...@gmail.com wrote:
Dear sir,
the following is the offical
$F is only for form elements. You can't use it on an A or another non-
form text container, as the OP would like. You could try maybe
tag.toString().stripTags() to get the inner text in a cross-browser
manner.
Walter
On May 10, 2010, at 10:54 AM, Yaz wrote:
You are trying to get the
Gaaa, never mind, that gets you the HREF.
Walter
On May 10, 2010, at 11:01 AM, Walter Lee Davis wrote:
$F is only for form elements. You can't use it on an A or another
non-form text container, as the OP would like. You could try maybe
tag.toString().stripTags() to get the inner text in a
Okay. $('tag').innerHTML.stripTags() will get you the inner text of
the A tag in most browsers. Not sure if it's completely available on
every browser supported by Prototype, but it should be fairly
consistent.
Walter
On May 10, 2010, at 11:01 AM, Walter Lee Davis wrote:
$F is only for
I can't believe something so simple would be so... unintuitive.
Walter you're right. And I'm an idiot. :)
-yaz
On May 10, 11:10 am, Walter Lee Davis wa...@wdstudio.com wrote:
Okay. $('tag').innerHTML.stripTags() will get you the inner text of
the A tag in most browsers. Not sure if it's
what about innerText() || textContent();
?
Alex Mcauley
http://www.thevacancymarket.com
- Original Message -
From: Yaz yasm...@gmail.com
To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, May 10, 2010 4:13 PM
Subject: [Proto-Scripty] Re
I usually add a method to the Element to do this:-
Element.addMethods({ getText: function(element){
element = $(element);
return element.textContent || element.innerText ||
_readTextNodes(element);
function _readTextNodes(e){
if(e.nodeType == 3 || e.nodeType == 4){
Hi,
As Walter and Yaz pointed out, you're trying to grab the text content
of the element, rather than an attribute of it.
See this thread for a discussion of how to do that, and an
implementation of a function to do it:
Hi Ilya,
don't be sorry, discovering bug, submit patch and test case take much
time, and I AM SORRY to ask you to repost :))
Those double google groups is not an evidence.
After posting on the prototype core group you should have to open a
ticket in LightHouse, so perhaps go directly there.
--
Hi,
patch, bug, discussion about prototype core, in a world what is not
about using prototype scriptaculous has its own google group.
So this post will have much response in prototype-core google group:
http://groups.google.com/group/prototype-core.
Or with this patch, open a ticket to
Oh, I'm sorry, will repost there, thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe
On Apr 9, 6:34 pm, Jason jbo...@gmail.com wrote:
Starting with 1.6.1 RC2, I discovered that using Element#readAttribute
with an attribute name of store causes IE7 to return a function
instead of null when the property doesn't exist:
function() {
var a = update([this], arguments);
On Mar 20, 12:09 pm, keemor kee...@gmail.com wrote:
Hello,
I have exactly this
problem:http://prototype.lighthouseapp.com/projects/8886/tickets/364-ie8-does...
I the last comment, Andrew Dupont says:
This was fixed a while back when I made all the changes necessary to
get the DOM tests
16 matches
Mail list logo