solution for IE6 .setAttribute bug?

F

fazfazzi

hello
how can i fix this? I know how to do if the attribute is css-related,
but what if it's an html attribute,
like checked="checked" ?
Thanks
 
D

David Mark

hello
how can i fix this? I know how to do if the attribute is css-related,

Fix what? And, other than "style" and "class", attributes aren't CSS-
related. Each of those attributes will cause problems in IE when
using get/setAttribute, but each for different reasons and not because
they are related to CSS.
but what if it's an html attribute,
like checked="checked" ?

Open up your playbook. Scratch out get/setAttribute. Go from there.
Hint: we just went over this.

As for your subject line, there is no IE bug related to get/
setAttribute (they are broken as designed.) And all released versions
of IE work the same in this regard. Hopefully MS will figure out how
to implement these methods in a future version of IE.
 
F

fazfazzi

Fix what?  And, other than "style" and "class", attributes aren't CSS-
related.  Each of those attributes will cause problems in IE when
using get/setAttribute, but each for different reasons and not because
they are related to CSS.


Open up your playbook.  Scratch out get/setAttribute.  Go from there.
Hint: we just went over this.

As for your subject line, there is no IE bug related to get/
setAttribute (they are broken as designed.)  And all released versions
of IE work the same in this regard.  Hopefully MS will figure out how
to implement these methods in a future version of IE.

Um sorry i replied to your email address
So, i really need to set unset attribute dinamically via jscript. If
not with setAttribute, how?
 
D

David Mark

Um sorry i replied to your email address

That's okay. I deleted it.
So, i really need to set unset attribute dinamically via jscript. If
not with setAttribute, how?

With properties. Try searching the archive. We *just* went over this.
 
M

Martin Honnen

So, i really need to set unset attribute dinamically via jscript. If
not with setAttribute, how?

In the JavaScript/ECMAScript binding of the HTML DOM the element objects
have typed properties corresponding to (most of) the attributes so you
can set e.g.
element.id = 'someId';
or
formControlElement.tabIndex = 2;
or
inputElement.checked = true;

Note that the 'class' attribute is scripted as the 'className' property.
 
T

Thomas 'PointedEars' Lahn

how can i fix this?
^
Fix your Shift key? Get a new keyboard, or install Brain 1.0.
Fix your posting? Read <http://jibbering.com/faq/#posting> and
I know how to do

Do what?
if the attribute is css-related, but what if it's an html attribute,
^^^ ^^^^
All attributes in an HTML document MUST be HTML attributes, else the
document is not Valid; see <http://validator.w3.org/>.

Even the `style' attribute, which you may refer to, is an HTML
attribute. It is only loosely CSS-related, as per Specification the
language used within its value may be any style-sheet language (that's
why you SHOULD declare

<meta http-equiv="Content-Style-Type" content="text/css">

although some user agents appear to take that as a default for this
attribute.)

<http://www.w3.org/TR/html4/present/styles.html#h-14.2.1>

BTW, HTML is an acronym for the HyperText Markup Language, and CSS is an
acronym for Cascading Style Sheets, respectively; they must be written
in *UPPERCASE*.
like checked="checked" ?

That's not really an HTML attribute as far as many HTML user agents are
concerned. They like the simple `checked' much better:

<http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.4>

And since it is a boolean attribute, you would assign `true' to the
corresponding property in order to set it and `false' in order to unset
it, provided that's what you are up to.

<http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-30233917>
<http://www.w3.org/TR/DOM-Level-2-HTML/ecma-script-binding.html>


PointedEars
 
D

David Mark

          ^
Fix your Shift key?  Get a new keyboard, or install Brain 1.0.
Fix your posting?  Read <http://jibbering.com/faq/#posting> and


Do what?


                      ^^^                              ^^^^
All attributes in an HTML document MUST be HTML attributes, else the
document is not Valid; see <http://validator.w3.org/>.

Even the `style' attribute, which you may refer to, is an HTML
attribute.  It is only loosely CSS-related, as per Specification the
language used within its value may be any style-sheet language (that's
why you SHOULD declare

<meta http-equiv="Content-Style-Type" content="text/css">

although some user agents appear to take that as a default for this
attribute.)

<http://www.w3.org/TR/html4/present/styles.html#h-14.2.1>

BTW, HTML is an acronym for the HyperText Markup Language, and CSS is an
acronym for Cascading Style Sheets, respectively; they must be written
in *UPPERCASE*.

They are abbreviations, but not acronyms.

[snip]
 
T

Thomas 'PointedEars' Lahn

David said:
Thomas said:
[snipped full quote]
BTW, HTML is an acronym for the HyperText Markup Language, and CSS is an
acronym for Cascading Style Sheets, respectively; they must be written
in *UPPERCASE*.

They are abbreviations, but not acronyms.

You are off-topic.

As for me, the distinctive property of an acronym is that it consists of
the leading characters of the words it means; as in *H*yper*T*ext
*M*arkup *L*angage, and *C*ascading *S*tyle *S*heets. On the other
hand, mere abbreviations such as `etc.', `ibid.', don't share that property.

YMMV.


PointedEars
 
D

David Mark

David said:
Thomas said:
[snipped full quote]
BTW, HTML is an acronym for the HyperText Markup Language, and CSS is an
acronym for Cascading Style Sheets, respectively; they must be written
in *UPPERCASE*.
They are abbreviations, but not acronyms.

You are off-topic.

Oh, Jesus. You are right, of course. What was I thinking?
As for me, the distinctive property of an acronym is that it consists of

And this is not OT?
the leading characters of the words it means; as in *H*yper*T*ext
*M*arkup *L*angage, and *C*ascading *S*tyle *S*heets.  On the other
hand, mere abbreviations such as `etc.', `ibid.', don't share that property.

Good rule of thumb: if you can pronounce it (and it is made up of
characters found in the abbreviated words), it is an acronym. Radar,
laser, fubar, STENDEC, etc. are acronyms; HTML and CSS are not.
 
T

Thomas 'PointedEars' Lahn

David said:
Oh, Jesus. You are right, of course. What was I thinking?

Apparently you were not thinking at that time.
And this is not OT?

Hence the "[OT]" in the Subject, which you snipped.
the leading characters of the words it means; as in *H*yper*T*extI
*M*arkup *L*angage, and *C*ascading *S*tyle *S*heets. On the other
hand, mere abbreviations such as `etc.', `ibid.', don't share that property.

Good rule of thumb: if you can pronounce it (and it is made up of
characters found in the abbreviated words), it is an acronym. [...]

Ahh, that: Eightch-tea-em-el. See-es-es. Worksforme.


HTH & HAND

F'up2 PointedEars
 
D

David Mark

Oh, Jesus.  You are right, of course.  What was I thinking?

Apparently you were not thinking at that time.
And this is not OT?

Hence the "[OT]" in the Subject, which you snipped.
Good rule of thumb: if you can pronounce it (and it is made up of
characters found in the abbreviated words), it is an acronym.  [...]

Ahh, that: Eightch-tea-em-el.  See-es-es.  Worksforme.

Pronounce as a word (reciting letters doesn't count.)
HTH & HAND

FU

[snip]
 
T

Thomas 'PointedEars' Lahn

David said:
Thomas said:
David said:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
BTW, HTML is an acronym for the HyperText Markup Language, and CSS is an
acronym for Cascading Style Sheets, respectively; they must be written
in *UPPERCASE*.
They are abbreviations, but not acronyms.
As for me, the distinctive property of an acronym is that it consists of
the leading characters of the words it means; as in *H*yper*T*extI
*M*arkup *L*angage, and *C*ascading *S*tyle *S*heets. On the other
hand, mere abbreviations such as `etc.', `ibid.', don't share that property.
Good rule of thumb: if you can pronounce it (and it is made up of
characters found in the abbreviated words), it is an acronym. [...]
Ahh, that: Eightch-tea-em-el. See-es-es. Worksforme.

Pronounce as a word (reciting letters doesn't count.)
HTH & HAND

FU
 
T

Trevor Lawrence

HTML and CSS are initialisms

Another example is ATM, but PIN is an acronym

Feel free to criticise me to your hearts' content because I top-posted
--
Trevor Lawrence
Canberra
Web Site http://trevorl.mvps.org

Thomas 'PointedEars' Lahn said:
David said:
Thomas said:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
David Mark wrote:
Thomas 'PointedEars' Lahn wrote:
BTW, HTML is an acronym for the HyperText Markup Language, and CSS
is an
acronym for Cascading Style Sheets, respectively; they must be
written
in *UPPERCASE*.
They are abbreviations, but not acronyms.
As for me, the distinctive property of an acronym is that it consists
of
the leading characters of the words it means; as in *H*yper*T*extI
*M*arkup *L*angage, and *C*ascading *S*tyle *S*heets. On the other
hand, mere abbreviations such as `etc.', `ibid.', don't share that
property.
Good rule of thumb: if you can pronounce it (and it is made up of
characters found in the abbreviated words), it is an acronym. [...]
Ahh, that: Eightch-tea-em-el. See-es-es. Worksforme.

Pronounce as a word (reciting letters doesn't count.)
HTH & HAND

FU

--
But he had not that supreme gift of the artist,
the knowledge of when to stop.
-- Sherlock Holmes in A. C. Doyle's
"The Adventure of the Norwood Builder"
 
J

John G Harris

Good rule of thumb: if you can pronounce it (and it is made up of
characters found in the abbreviated words), it is an acronym. Radar,
laser, fubar, STENDEC, etc. are acronyms; HTML and CSS are not.

That's not a clear distinction. Take SCSI. Some people pronounce it ess
see ess aye; some pronounce it scuzzy. Do you say it's both an acronym
and not an acronym at the same time, or do you say it's neither ?

What do you say about cwm when it's used as an English word ?

John
 
T

The Natural Philosopher

John said:
That's not a clear distinction. Take SCSI. Some people pronounce it ess
see ess aye; some pronounce it scuzzy. Do you say it's both an acronym
and not an acronym at the same time, or do you say it's neither ?

What do you say about cwm when it's used as an English word ?

John
According to Wiki, if its spoken as initials it's an initialism, if its
spoken as a word it's an acronym.

Both are forms of abbreviations,. but abbrevations don't need to be
either acronyms or initialisms.


Oh and CWM *is* an english word. From the welsh. Cf a corrie. An
probably a coombe, as well.
;-)
 
D

David Mark

That's not a clear distinction. Take SCSI. Some people pronounce it ess
see ess aye; some pronounce it scuzzy. Do you say it's both an acronym
and not an acronym at the same time, or do you say it's neither ?

I'd say it doesn't fit this particular rule of thumb. And it isn't so
much whether it can be pronounced, but whether it is intended to be.
You can call SCSI what you like, but I see it as an abbreviation that
people attempt to pronounce as a word (with less than accurate
results.)
 
J

John G Harris

I'd say it doesn't fit this particular rule of thumb. And it isn't so
much whether it can be pronounced, but whether it is intended to be.
You can call SCSI what you like, but I see it as an abbreviation that
people attempt to pronounce as a word (with less than accurate
results.)

It was the IEEE committee members who thought it should be pronounced
scuzzy, or so I was told at the time by a committee member. I'm glad
there are other people who think it was daft.

I was also told that 'specification' guarantees compatibility between
different products, whereas 'standard' guarantees that you can sell your
product to the Department of Defence. Nothing changes :-(

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top