Web Analytics Made Easy -
StatCounter this.select on pre? - CodingForum

Announcement

Collapse
No announcement yet.

this.select on pre?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • this.select on pre?

    So appearently I cannot use
    Code:
    onclick="this.select"
    on any element other than textareas?

    Any workaround to do this on a 'pre' tag?
    or any feelings on this?
    am i not thinking about this correctly?
    ._-zro
    [email protected]
    zro.redtv.org

    "If HTML and the Web made all the online documents look like one huge book, RDF, schema, and inference languages will make all the data in the world look like one huge database"
    -Tim Berners-Lee, Weaving the Web, 1999

  • #2
    What are you trying to do?

    Comment


    • #3
      ya, sry... wasnt very specific.

      http://r6.killerb.net/
      thats the page im working on.

      http://r6.killerb.net/js/clicks.js
      is the js im using.

      basically i have bunch of 'snippets', and i wanna have them highlight (for easy copying) when you click them.

      Currently I hav jsut switched from pre to textarea, but it seems more semantically sound for them to be pre, but i guess its no big deal.

      lemme kno what people think.
      ._-zro
      [email protected]
      zro.redtv.org

      "If HTML and the Web made all the online documents look like one huge book, RDF, schema, and inference languages will make all the data in the world look like one huge database"
      -Tim Berners-Lee, Weaving the Web, 1999

      Comment


      • #4
        Both text areas and pres keep their formatting. I would use a textarea for what you want to do. Only thing you might want to do is run the snippets through some server side script that converts < and > to html entities. Just make the textareas readonly so users can't accidently erase them.
        ||||If you are getting paid to do a job, don't ask for help on it!||||

        Comment

        Working...
        X