PDA

View Full Version : Dynamic JavaScript Endeavor


influxer
06-12-2005, 08:38 PM
Hey all,

I am in the process of making a website for my school to host blogs. I am almost done, and I am working on the last section of the website that handles the visual aspect of every page (background color, text color, border colors, etc.)

I want to make a dynamic layer on the page that shows the users a preview of what their page will look like, so when they choose a certain color for the background, it will automatically change it in the preview on the same page. Or when they change the text color, the text in the preview will change accordingly.

Since I am fairly new to DHTML/JavaScript but know I am capable of doing this, where exactly should I look to research this? Any particular websites that I should look at? What is the formal term/phrase of what I am looking to do (DHTML/JavaScript Dynamic Layer?)?

Thanks in advance!
-influxer

brandonH
06-12-2005, 09:32 PM
you can always change the previews attributes ( color, text, ect...) using javascript and style. or you can use CSS (cascading style sheet) to alter the color and font type/size.

influxer
06-12-2005, 09:39 PM
So where exactly do I look, any example pages?

What should I be searching for?

brandonH
06-12-2005, 10:08 PM
i created an example page for using javascript....

see attached. ( must convert it to an html file )

if shows how to change background color, font color, and font family.

you can also change font weight, size, ect.....

influxer
06-12-2005, 10:44 PM
Thanks for the file, Brandon...This is the perfect place to start.

I had something similar to this before that wasn't working quite as well as this one...but there some slight modifications i would like to make to this one.

Could I make it so that it automatically updates the color/font upon entering text into the box (so you don't have to click the button to change it)? I'm sure it's possible, would I have to make use of the onChange command?

Thanks.


P.S: The link on that page to comptechdoc was already in my bookmarks from yesterday..if that's your website, thanks, it has been of much help.