brutfood
02-01-2003, 06:33 PM
What is the syntax to dynamically change a CSS text style? I want to be able to change the font family, font-size etc from Javascript.
This may seem like an odd thing to want to do - but I have a good reason for it.
If there isn't a way to do this, I'll just put in HTML tags in my dynamically changing text.
Zach Elfers
02-01-2003, 09:39 PM
<span style="color:#000000;" onMouseOver="this.style.color='#ffffff';" onMouseOut="this.style.color='#000000';">Hope this helps!</span>
I hope that gives you some ideas!
brutfood
02-03-2003, 04:41 PM
Sorry that's not really what I need. I'll be specific. I've written a WEB template customisation application. You can find it on the core operating system:-
http://www.i2genius.com/coreos/core.html
It's still under development, but look in the multimedia folder, it's called site. It allows you to create, drag and manipulate text and pictures over a template. It generates the HTML to represent what's happened on the screen, and I want to do a preview that doesn't use any back-end code for this (although back-end code is used to perform a publish) - only javascipt. So I'll load a blank template, and then use .document.write(SomeHTML); to create the body of the page. However, I've used a CSS style to define the button text style. And it's this I want to alter. As I said, if it can't be done, I'll just do it the long-hand HTML way.
By the way. When I was making the part of core that launches applications, I started to write hooks that would it to launch applications to be written in Javascript, Director etc., and for them to access the filing system. Of course, they would open in seperate browser windows. I'm trying to encourage app writers to create stuff for core. If anyone has a nice javascript app that they'd like to include, let me know.