Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Dec 2005
    Location
    Ohio
    Posts
    286
    Thanks
    7
    Thanked 9 Times in 9 Posts

    Script changes colour on reload

    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!

  • #2
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,146
    Thanks
    39
    Thanked 505 Times in 499 Posts

    Unclear ...

    I'm not getting the problem in FF.

    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.

  • #3
    Regular Coder
    Join Date
    Dec 2005
    Location
    Ohio
    Posts
    286
    Thanks
    7
    Thanked 9 Times in 9 Posts
    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:

  • #4
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,146
    Thanks
    39
    Thanked 505 Times in 499 Posts

    Question Try this ...

    See if changing the 'black' to 'white' in the style assignments on this line of your script.
    PHP Code:
        <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</awith edits by The Peaceful Palace</div></td></tr>  
    Did that fix it?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •