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

Discussion in 'Javascript' started by Michi, May 22, 2006.

  1. Michi

    Michi Guest

    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
    Michi, May 22, 2006
    #1
    1. Advertising

  2. Michi

    Ian Collins Guest

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

    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.
    Ian Collins, May 22, 2006
    #2
    1. Advertising

  3. Michi

    Michi Guest

    Totally awesome !!! - the easiest solution was most far away from my
    mind.

    But there still remains one little problem: css validation.

    Many thanks

    Michael
    Michi, May 22, 2006
    #3
  4. Michi

    Randy Webb Guest

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

    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/
    Randy Webb, May 22, 2006
    #4
  5. Michi

    Michi Guest

    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/
    Michi, May 22, 2006
    #5
  6. Michi

    Randy Webb Guest

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

    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/
    Randy Webb, May 22, 2006
    #6
  7. Re: ??? document.getElementById('ID').style.-moz-user-select ='text' ???

    "Michi" <> 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 -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
    Lasse Reichstein Nielsen, May 22, 2006
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lawrence
    Replies:
    13
    Views:
    295
    Thomas 'PointedEars' Lahn
    Sep 4, 2004
  2. lawrence
    Replies:
    11
    Views:
    284
    Dr John Stockton
    Oct 4, 2004
  3. wk
    Replies:
    5
    Views:
    166
    Dietmar Meier
    Apr 22, 2005
  4. Martin
    Replies:
    3
    Views:
    145
  5. Replies:
    4
    Views:
    160
    Jonas Raoni
    Nov 21, 2006
Loading...

Share This Page