PDA

View Full Version : Sychronizing/Updating Page Colours


Simon
03-15-2002, 03:25 AM
Hi,

I use Frontpage & I was wondering if there is a simple way to synchronize and update default colours (eg, text colour, link colour, etc) for a many pages at once.

I know how to use Web-Bot includes, but I cant seem to be able to syncronize page colours with it.

Has anyone been able to do this? Using anything? (hopefuly compatible w/FPage 98)?

Thank you.

smoke9000
03-15-2002, 02:32 PM
To be honest... I heard so many bad things about FrontPage, I never got it... So, I'm hoping that you can edit the 'HTML' of your site without problem.

What I ( sometimes ) do is put my body tag into a javascript ( .js ) file so that if I want to change the colors in my website, I just change that file and POOF!

PART 1--
what you'll want to do is open ( You may hate this ) NOTEPAD and paste this into it:

document.write('<body text="black" bgcolor="orange" link="white"> ');

Save it as 'body.js' ( with out the ' ' ) and upload it to your site.

PART 2--
In your HTML code, remove the <body> tag and replace it with this :
<script language="javascript" src="http://www.yoursite.com/body.js"></script>

Then all you have to do is replace the contents of the .js file...
Hope this gave you an Idea ( at least )...
-Ross :D

smoke9000
03-15-2002, 02:35 PM
An error is up there and it wont correct!
Replace your Body tag with this:



<script language="javascript" src="http://www.yoursite.com/body.js">
</script>



-Ross:D

smoke9000
03-15-2002, 02:39 PM
I AM BEGINING TO HATE THIS BOARD!! If you want to know what to replace the BODY tag with, e-mail me at smoke9000@aol.com
OK!
-Ross :p

nsr81
03-15-2002, 02:40 PM
why not use CSS, I think FP allows an external CSS file to be linked.

smoke9000
03-15-2002, 02:44 PM
CSS is another option... nsr81 is right... If you know how to make CSS files, that would be good... even though it isn't supported in older browsers... but then again... javascript isn't supported in older browsers either... it all depends how far back in time you go... never mind... just jabering...
-Ross

Simon
03-19-2002, 02:26 PM
Yah, I thought of CSS, but those arent very well supported at all.

Javascript is actually a better option, since that it supported by 3.0 browsers but still some people turn off JS.

There really is no good option. All I can think of as an interim solution is writing a Perl script to rip out all the body tags and replce em.

Hmm... I'm sure someone has already made one like that and put it on the net....

Also I found an option: "Use background colours from page...."
But doubt NetScape supports that one.

josh
03-19-2002, 02:38 PM
Another option might be to use SSI. Simply add the body tags and anyhting else into a seperate file, rename your pages to .shtml and include the external file in them.