Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 11-09-2004, 01:16 PM   #1 (permalink)
DavH27
PHP Pilgrim
 
DavH27's Avatar
 
Join Date: Aug 2004
Location: London
Posts: 170
DavH27 is on a distinguished road
Text format changing

Let's say my site as a heading and body text. They both have different formatting. Let's assume the formatting for these are CSS initially. I say assume because the answer to the question might need this to be different.

What I want to do is allow the user to choose what text formatting they want in a control panel. I can easily do this by submitting the info in a form, making the changes in .css file by some fancy means using both different css files and a db. The changes they select should affect a box with 'preview' text in it. The user then clicks a 'save' button which makes these changes to a css.

I don't want the page to reload to show the preview so form submissions are out the window.

I assume this is JavaScript as it is client side. But is it possible?
__________________
Davy - Programming since 1998 [CV]
Currently working on: n/a
Status: n/a
DavH27 is offline   Reply With Quote
Old 11-09-2004, 03:04 PM   #2 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
http://www.codelifter.com/main/javas...ngestyles.html

^ Not exactly what you want, but its along the same lines. (changing the entire page instead of one element)

I think I did something similar in a recent php app where the user did something and I had some javascript change the ID or class of one specific element on the page. I'll see if I can find it.


My google search that might help
idx is offline   Reply With Quote
Old 11-09-2004, 03:06 PM   #3 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
http://www.onlinetools.org/articles/...eparation.html

Here's a good example. I think that's pretty much what I did.

-r
idx is offline   Reply With Quote
Old 11-09-2004, 03:10 PM   #4 (permalink)
DavH27
PHP Pilgrim
 
DavH27's Avatar
 
Join Date: Aug 2004
Location: London
Posts: 170
DavH27 is on a distinguished road
I haven't looked through it entirely but it looks pretty much what I want! Thanks, man.
__________________
Davy - Programming since 1998 [CV]
Currently working on: n/a
Status: n/a
DavH27 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing all the Text Size on a page buchannon HTML, XML, Javascript, AJAX 5 11-03-2004 01:15 PM
[MySQL] blob vs text redhead PHP 2 03-29-2004 11:15 PM


All times are GMT -8. The time now is 02:21 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting