is there a way to apply a line of javascript to CSS style sheet class? ie. i want to put this line of code: onFocus="this.select();"
to all input text boxes.
thanks.
You can not ackomplish this with CSS. You could easily do this in a server-side environment like JSP or ASP. You would simply create a variable and set that variable's value = to the javascript command you want to execute. You could then place that variable inside each of the form elements that require this script. Otherwise, if you are in a static environment, ie HTML, you are left with placing the javascript function in each form element.
thread216-224055
***
debrac (IS/IT--Manageme) Mar 5, 2002
how do i highlight the whole text in text box when using the mouse to enter the text box at any point of the text?
thanks
This is possible with javascript, which you must know. You can use the DOM to get your INPUT tags or any other tags for that matter, but you need to know how to loop through them and set their onfocus property to your code.
My javascript editor is not installed right now, otherwise I would give you a hint on the code. Rocco is the BOY!!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.