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 7 of 7
  1. #1
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts

    Auto-refresh not keeping text

    I am using a 20 second auto-refresh for a small chatbox. While your typing the text disappears after it refreshes. What kind of code would it be to keep the text?

  • #2
    New Coder
    Join Date
    Dec 2005
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you use frames and have the messages in a frame and the response area in a separate frame, it seems like it should work.
    Web hosting...webmaster support http://www.eofficeprofessionals.com/forums
    Offer solutions-not criticism.

  • #3
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    From what you're saying I am presuming you are making the whole page refresh, including the text box where you type text into (and as a result the text is lost).

    What you should do is perhaps have the actual text box with the chat in, in an iFrame, and refresh the iFrame, not the whole page.

  • #4
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    I guess more information would have helped. It's in a template and its a little box. Only the small box refreshes and not the whole page.
    Here is the code I used to auto-refresh it.
    Code:
    <meta http-equiv="refresh" content="20">
    And here is the entire code. The frame is only about 150 px width and 300 px height.


    Code:
    <?php
    $template = <<<THEVERYENDOFYOU
    <head>
    <title>shoutbox</title>
    <meta http-equiv="refresh" content="20">
    <style type="text/css">
    body {
      background-image: url(images/choice3.jpg);
      color: black;
      font: 11px verdana;
      margins: 0px;
      padding: 0px;
    }
    div {
        padding: 2px;
        border: solid 1px black;
        margin: 2px;
        text-align: left;
    }
    a {
        color: #663300;
        text-decoration: none;
        font-weight: bold;
    }
    a:hover {
        color: #330000;
    }
    </style>
    </head>
    <body onload="window.scrollTo(0,99999)">
    {{content}}
    </body>
    </html>
    THEVERYENDOFYOU;
    ?>

  • #5
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    Does anyone know what I mean? Or do you need a screen shot?

  • #6
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think a link would be better, I know I'm having a bit of a hard time wondering what you mean exactly!

  • #7
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    Well the only way to give you a link is if you register an account (free) and no emails from it. Because its through a username and password field. But the link is www.creativeskateboardteam.com/game/index.php
    It's called a babble box, you'll see 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
    •