SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: refresh issue

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    aaaa
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    refresh issue

    I got a chat script which are composed with frames with refresh to re-load the page
    As the main page's background are black in color, on each refresh the background turn white....

    Is JS has capability or functions to make the background remain to its current color...(black)

    thanks...

  2. #2
    SitePoint Zealot
    Join Date
    May 2003
    Location
    Sarasota, FL
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kojr,

    please post the code you are currently using.
    Chris Bloom
    Web Application Developer

  3. #3
    SitePoint Addict
    Join Date
    Aug 2001
    Location
    Los Angeles, CA
    Posts
    346
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <input type='button' value='Change BG color' OnClick="window.document.bgColor='#000000'; return true">

    ^^ that changes the background color to black, when the button is clicked of course. Hopefully this was what you were looking for.

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    aaaa
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies of two
    This is the code of message frame which the message is being written after <--begin--> by meta's refresh capability
    Code:
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Refresh" CONTENT="15; url=$myurl?action=showmessage&username=$username">
    </HEAD>
    <BODY style="line-height:140%" bgcolor="1A1A1A" text="#888888">
    <!--bigin-->
    </body></html>
    So, every fresh the page turns white background..

  5. #5
    SitePoint Addict
    Join Date
    Aug 2001
    Location
    Los Angeles, CA
    Posts
    346
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The default background color for a web page though is white...So I'm still not sure exactly what you're trying to do, and if I scratched the surface of what you were looking for with my earlier post.

  6. #6
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    aaaa
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    to fregc.
    I got not button there in my message frame..

  7. #7
    SitePoint Zealot
    Join Date
    May 2003
    Location
    Sarasota, FL
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    kojr,

    Does the variable $myurl contain the name of the current page or does it actually redirect to another page?

    If it is the same page, then I can see no reason why this would be occuring. However, you could impliment gregc's fix by using the onload event of the BODY tag:
    HTML Code:
    <BODY style="line-height:140%" bgcolor="1A1A1A" text="#888888" onload="window.document.bgColor='#1A1A1A';">
    Also, you might want to try prefixing the bgcolor attribute of the BODY tag with a # sign. Oh, and if it is the same page, there's no need to include a url in the refresh meta tag at all, just include the seconds (15) with no ";" afterwards.

    Otherwise, if the $myurl variable makes the refresh redirect to another page you'll have to check what the bgcolor of that page is set to.
    Chris Bloom
    Web Application Developer

  8. #8
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    aaaa
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    great great thank to all of you
    it is right.....


Bookmarks

Posting Permissions

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