f



??? document.getElementById('ID').style.-moz-user-select = 'text' ???

Hallo,

of course, this doesn't work:
document.getElementById('ID').style.-moz-user-select = 'text';
- but i hope it shows my problem...

Is it possible to set this css option by javascript and how? Is there
any workaround for that?
I'd need this to temporarily avoid text selection.

Many thanks
and best regards,

Michael

0
michi334 (4)
5/22/2006 1:55:07 AM
comp.lang.javascript 38370 articles. 2 followers. javascript4 (1315) is leader. Post Follow

6 Replies
556 Views

Similar Articles

[PageSpeed] 52

Michi wrote:
> Hallo,
> 
> of course, this doesn't work:
> document.getElementById('ID').style.-moz-user-select = 'text';
> - but i hope it shows my problem...
> 
> Is it possible to set this css option by javascript and how? Is there
> any workaround for that?
> I'd need this to temporarily avoid text selection.
> 
Put it in a class and set the element's class.

-- 
Ian Collins.
0
Ian
5/22/2006 1:57:31 AM
Totally awesome !!! - the easiest solution was most far away from my
mind.

But there still remains one little problem: css validation.

Many thanks

Michael

0
Michi
5/22/2006 2:09:49 AM
Michi said the following on 5/21/2006 10:09 PM:
> Totally awesome !!! - the easiest solution was most far away from my
> mind.

What solution?

Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers.

<URL: http://www.safalra.com/special/googlegroupsreply/ >

> But there still remains one little problem: css validation.

Pick your poison. Validation is not all that it is made out to be though.

-- 
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
0
Randy
5/22/2006 2:54:53 AM
Randy Webb schrieb:

> Michi said the following on 5/21/2006 10:09 PM:
> > Totally awesome !!! - the easiest solution was most far away from my
> > mind.
>
> What solution?

What's wrong with you?
Ian wrote only one sentence. Where do you think, would it be sensefull
to look for that solution?

> Please quote what you are replying to.

Will do so in the future.

> If you want to post a followup via groups.google.com, don't use the
> "Reply" link at the bottom of the article. Click on "show options" at
> the top of the article, then click on the "Reply" at the bottom of the
> article headers.

Thanks for the tip.

> <URL: http://www.safalra.com/special/googlegroupsreply/ >
>
> > But there still remains one little problem: css validation.
>
> Pick your poison. Validation is not all that it is made out to be though.

Think thats not necessary! - Like i said: just a little problem! -But
why choose the second best option?

> --
> Randy
> comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
> Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

0
Michi
5/22/2006 4:06:22 AM
Michi said the following on 5/22/2006 12:06 AM:
> Randy Webb schrieb:
> 
>> Michi said the following on 5/21/2006 10:09 PM:

<snip>

>>> But there still remains one little problem: css validation.
>> Pick your poison. Validation is not all that it is made out to be though.
> 
> Think thats not necessary!

What? That I said that Validation is not all that it is made out to be? 
Well, it isn't.

>  - Like i said: just a little problem! -

As I said....

> But why choose the second best option?

Do you mean the option where your page doesn't work as intended because 
making it work as intended will cause a CSS Validation failure?
-- 
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
0
Randy
5/22/2006 4:53:49 AM
"Michi" <michi@kjl.de> writes:

> of course, this doesn't work:
> document.getElementById('ID').style.-moz-user-select = 'text';
> - but i hope it shows my problem...

Perhaps it does.
Try ...style.MozUserSelect = 'text'
See <URL:http://devedge-temp.mozilla.org/library/xref/2002/client-data/property-data-style.html>

> I'd need this to temporarily avoid text selection.

Sounds like something that could annoy a user :)
/L
-- 
Lasse Reichstein Nielsen  -  lrn@hotpop.com
 DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
  'Faith without judgement merely degrades the spirit divine.'
0
Lasse
5/22/2006 5:57:31 AM
Reply: