...

View Full Version : Auto-refresh not keeping text



masterofollies
12-05-2005, 05:33 PM
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?

pramsey
12-05-2005, 07:06 PM
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.

mark87
12-05-2005, 07:39 PM
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.

masterofollies
12-05-2005, 10:27 PM
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.

<meta http-equiv="refresh" content="20">

And here is the entire code. The frame is only about 150 px width and 300 px height.



<?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;
?>

masterofollies
12-07-2005, 03:15 AM
Does anyone know what I mean? Or do you need a screen shot?

mark87
12-07-2005, 08:04 AM
I think a link would be better, I know I'm having a bit of a hard time wondering what you mean exactly! :)

masterofollies
12-09-2005, 01:56 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum