This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Bodie, I dont know js very well but the reference I use doesnt have a property called style for any object. could you give me a link to a tutorial or something that explains? This reference gives 5 properties of textArea defaultValue, form, name, type and value D'oh maybe it is vbscript?
Nope, the style property is part of Cascading Style Sheets (CSS). There are a bunch of different ways that you can apply this stuff. Using Style sheets:
you define a "style" that you want to apply in several different places. Then you only have to set your HTML object's Class attribute to apply the style. Like this:
This applies the style defined by your .text entry in the style sheet to the TD in question. You can also do this using the style attribute of an HTML element if the style isn't going to be widely reused. Like this:
You have to be careful, because the properties of a style sheet have different names in DHTML than they do in HTML. Notice that in HTML the property is called font-weight, but in DHTML it is called fontWeight. That's my $.02 on CSS.