Results 1 to 7 of 7

Thread: Yet ANOTHER HTML issue

  1. #1
    Old-Ones Studios Cruise Control's Avatar
    Join Date
    Apr 2005
    Location
    Seattle, WA
    Posts
    3,799

    Default Yet ANOTHER HTML issue

    I have a background issue, after the image ends, it should appear black but is showing up white. I downloaded this by the way, so in no way do I take credit for all of it. It worked fine till I added another link and the fade in thing. Site can be found here: Web-Page

    You'll have to click veiw menu, source because I disabled right-clicking.
    Leave some shards under the belly
    Lay some grease inside my hand
    It's a sentimental jury
    And the makings of a good plan

  2. #2
    Draw the Drapes Recognized Member rubah's Avatar
    Join Date
    Dec 2004
    Location
    Now Destiny is done.
    Posts
    30,653
    Blog Entries
    21
    Contributions
    • Former Administrator
    • Former Cid's Knight

    Default

    *right clicks since she is l33t and uses firefox*
    That coding is really messy. Maybe it's because I've spent the last week cleaning my site's code, but that stuff makes me want to gag

    all you need is a background-color:black; in the body section of your stylesheet.

  3. #3

    Default

    You set <BODY BGCOLOR=black> using the primative HTML attributes for the body tag. :thwack: Don't do this, use Rubah's method, better known as CSS.

    Teh problem lies in your Javascript. I read through your source, and it WAS messy as Rubah had also mentioned. It looks like you have a script which cycles through background colors to make a fade in effect - this is evil and will not work right on firefox.

    The problem is simply the script ends up in a white screen - which overrides your black background because the background will start off black as the HTML specifies THEN the javascript will kick in and make the fading background. I would also kill the music, or put a control up and set it to off on default

    I am pretty sure this will get you the answer, if not closer.

    Bipper

  4. #4
    Old-Ones Studios Cruise Control's Avatar
    Join Date
    Apr 2005
    Location
    Seattle, WA
    Posts
    3,799

    Default

    I was thinking about in school and realized that that was the probable answer. And yes I know it's messy, I'm working on it.
    Last edited by Cruise Control; 12-05-2005 at 09:59 PM.
    Leave some shards under the belly
    Lay some grease inside my hand
    It's a sentimental jury
    And the makings of a good plan

  5. #5
    Draw the Drapes Recognized Member rubah's Avatar
    Join Date
    Dec 2004
    Location
    Now Destiny is done.
    Posts
    30,653
    Blog Entries
    21
    Contributions
    • Former Administrator
    • Former Cid's Knight

    Default

    run it through the w3c's validation. and code it in firefox:] it'll make it a lot less stressful when you run into the "omg, w3c says it's wrong, but it looks right!" errors.

  6. #6
    Old-Ones Studios Cruise Control's Avatar
    Join Date
    Apr 2005
    Location
    Seattle, WA
    Posts
    3,799

    Default

    I have no idea what any of that means. I just killed of the cool thing when you enter the page. That solved the problem. Unless someone can edit the cool flashy thing to make it happen and keep the background black.

    Heres the original:
    PHP Code:
    <img src="/xxx.gif"><img src="/xxx.gif"><img src="/xxx.gif"><img src="/xxx.gif"><img src="/xxx.gif"><img src="/xxx.gif"><img src="/xxx.gif"><img src="/xxx.gif">>
    <!--
    function 
    describe(aString) {
        
    top.status aString;
        return 
    true;
    }

    function 
    makearray(n) {
        
    this.length n;
        for(var 
    1<= ni++)
            
    this[i] = 0;
        return 
    this;
    }

    hexa = new makearray(16);

    for(var 
    010i++)
        
    hexa[i] = i;

    hexa[10]="a"hexa[11]="b"hexa[12]="c";
    hexa[13]="d"hexa[14]="e"hexa[15]="f";

    function 
    hex(i) {
        if (
    0)
            return 
    "00";
        else if (
    255)
            return 
    "kk";
        else
            return 
    "" hexa[Math.floor(i/16)] + hexa[i%16];
    }

    function 
    setbgColor(rgb) {
        var 
    hr hex(r); var hg hex(g); var hb hex(b);
        
    document.bgColor "#"+hr+hg+hb;
    }

    function 
    fade(srsgsberegebstep) {
        for(var 
    0<= stepi++) {
            
    setbgColor(
            
    Math.floor(sr * ((step-i)/step) + er * (i/step)),
            
    Math.floor(sg * ((step-i)/step) + eg * (i/step)),
            
    Math.floor(sb * ((step-i)/step) + eb * (i/step)));
        }
    }

    fade(4,4,200,255,255,255,100);

    //-->
    </script> 
    I don't know why but it replaces < script > with the swear filter for <img src="/xxx.gif"><img src="/xxx.gif"><img src="/xxx.gif"><img src="/xxx.gif">.
    Leave some shards under the belly
    Lay some grease inside my hand
    It's a sentimental jury
    And the makings of a good plan

  7. #7

    Default

    quick and dirty fix;

    setbgColor(0, 0, 0);

    Add that line to the end of your javascript. Somthing along those lines should do the trick.
    If not I can give ya a better hand in the morning - off to work!

    Bipper

Posting Permissions

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