View Full Version : this.select on pre?
10-15-2006, 09:28 PM
So appearently I cannot use
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?
10-15-2006, 10:03 PM
What are you trying to do?
10-15-2006, 10:20 PM
ya, sry... wasnt very specific.
thats the page im working on.
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.
10-15-2006, 10:32 PM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.