View Full Version : Script changes colour on reload

09-26-2008, 01:11 AM
I am working with this script: http://www.doriennesmith.com/peace/mazesmith.js on this page: http://www.doriennesmith.com/peace/maze.html.

The problem I have is that when one initially visits the page, the text outside of the "config" box appears as the colour set by the CSS. However, once the user chooses the "New Maze" option, the same exact text (supposedly using the same code and CSS to populate and style) reverts to black and will stay black even if the user goes back to the "config" box. If the page is refreshed, however, the text becomes the styled colour again, only to repeat the same problem.

I have been perusing the script all day and, while I have little knowledge of javascript, I know enough to tell where the script will load text and that in between a <style> tag in the code, I can edit the CSS accordingly. That said, I cannot understand the where the problem may lie. I know this is not simply an instance of changing the style of the page by itself because the script loads all of the text on the page, so I know somewhere in the script is the answer, I simply cannot find it.

I know this may be asking a lot, but could anyone help me out with this?

Many thanks!

09-26-2008, 05:05 AM
I'm not getting the problem in FF. :confused:

When loaded, the background color is a dark blue.
When I change to 'New Maze', I see a maze with a dark blue background.
When I refresh, still stays the same as when loaded.
When I re-load, still no change to background color.

Describe the problem a little more for me please. :eek:

09-26-2008, 05:24 AM
The background colour is not the problem. It is the colour of the text at the top of the page. Here is what I mean:

When you first get to the page:

When you click on New Maze:

When you click on Options again:

09-26-2008, 05:57 AM
See if changing the 'black' to 'white' in the style assignments on this line of your script.

<tr><td colspan="2" style="text-align:center"><div style="padding-top:5px;font-size:9px;"><a href="http://mazesmith.sourceforge.net/" target="_blank" style="text-decoration:none;color:black;">Mazesmith 0.7.0 by Robert</a> with edits by The Peaceful Palace</div></td></tr> \

Did that fix it?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum