refresh effect

B

Bruno

Hi there,

I have some code (it will be a chat later) which uses the meta tag

<meta http-equiv="refresh" content="135; URL=/mydomaine/index-neu.php">

Yes, after 135 seconds, I see a refresh on the IE. However, if I work in GMX
or something else, the refreshed page will bring up the window in front of
everything, that ist enoying!

here is the code (which is generated by a php Script)

can anyone help me on this $%& strange effect?
regards Bruno
x----------------
<head>
<style type="text/css">
<!--
body { font-family: Arial; font-size: 8pt; background-color:
#CCFFFF; color: #000000}
..top_td { border-top-style: solid }
..bottom_td { border-bottom-style: solid ; border-width:1px;}
input { font-size: 8pt }
..chat { font-size: 14pt; font-weight: bold }
td { font-size: 8pt }
..von_an_td { font-size: 7pt; border-right-style: solid ; border-width:1px;
border-color:#000000; }
..datum_td { font-size: 7pt; border-right-style: solid ; border-width:1px;
border-color:#000000;}
..chat_td { font-size: 9pt; font-weight: bold; }
..filter { font-size: 8pt; font-weight: bold; border-bottom-width: 1px;
border-bottom-style: solid; border-color:#000000;}
select { font-size: 8pt }

-->
</style>
<script type="text/javascript">

function chkFormular()
{
if(document.form.von.value == "--") {
alert("Bitte Ihren Namen eingeben!");
document.form.von.focus();
return false;
}
}
document.form.mit_absicht_falsch.focus();


</script>
<meta http-equiv="refresh" content="35; URL=/myhost/index-neu.php">
<title>another test</title>
</head>
<body topmargin="1" leftmargin="1" onLoad="document.forms[0].reset();">


<p>

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<form method="get" action="" name="form" onSubmit="return
chkFormular()">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<input type="text" name="chat_input" size="170" tabindex="1">
</td>
<td>
<input type="submit" value="Abschicken" name="send"
tabindex="2">
</td>
</tr>
<tr>
<td class="bottom_td">
Von:
<select size="1" name="von" tabindex="3">
<option value="--">--</option>
<option selected >b_s</option>
<option>c_g</option>
<option>f_n</option>
</option>
</select>
an:
<select size="1" name="an" tabindex="4">
<option value="--">alle</option>
<option>b_s</option>
<option>c_g</option>
<option>f_n</option>
</select>
Filter
<select size="1" name="filter" tabindex="5">
<option value="--">kein</option>
<option>b_s</option>
<option>c_g</option>
<option>f_n</option>
</select>
Verzögerung: <input type="text" name="delay" size="3"
value="35" tabindex="6">

</td>
<td class="bottom_td">
&nbsp;
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td class="filter">
</td>
</tr>

<tr>
<td>

<table border="0" cellspacing="0" cellpadding="0" ><tr>
<tr bgcolor='#ffffff'>
<td valign='top' width='10' class='von_an_td'></td>
<td valign='top' width='10' class='von_an_td'>--</td>
<td valign='top' width='10' class='datum_td'>06_11:42:39</td>
<td valign='top' width='1200' class='chat_td'>&nbsp;test</td>
</tr>
</table><table border="0" cellspacing="0" cellpadding="0" ><tr>
<tr bgcolor='#ffddee'>
<td valign='top' width='10' class='von_an_td'>b_s</td>
<td valign='top' width='10' class='von_an_td'>--</td>
<td valign='top' width='10' class='datum_td'>06_11:43:00</td>
<td valign='top' width='1200' class='chat_td'>&nbsp;another test</td>
</tr>
</table>
</td>
</tr>
</table>
<script type="text/javascript">

document.form.chat_input.focus();

</script>

<p>

</body></html>
 
G

Guest

Bruno said:
Hi there,

I have some code (it will be a chat later) which uses the meta tag

<meta http-equiv="refresh" content="135; URL=/mydomaine/index-neu.php">

Yes, after 135 seconds, I see a refresh on the IE. However, if I work in
GMX or something else, the refreshed page will bring up the window in
front of everything, that ist enoying!

here is the code (which is generated by a php Script)

can anyone help me on this $%& strange effect?
regards Bruno
x----------------
<head>
<style type="text/css">
<!--
body { font-family: Arial; font-size: 8pt; background-color:
#CCFFFF; color: #000000}
.top_td { border-top-style: solid }
.bottom_td { border-bottom-style: solid ; border-width:1px;}
input { font-size: 8pt }
.chat { font-size: 14pt; font-weight: bold }
td { font-size: 8pt }
.von_an_td { font-size: 7pt; border-right-style: solid ;
border-width:1px; border-color:#000000; }
.datum_td { font-size: 7pt; border-right-style: solid ;
border-width:1px; border-color:#000000;}
.chat_td { font-size: 9pt; font-weight: bold; }
.filter { font-size: 8pt; font-weight: bold; border-bottom-width:
1px; border-bottom-style: solid; border-color:#000000;}
select { font-size: 8pt }

-->
</style>
<script type="text/javascript">

function chkFormular()
{
if(document.form.von.value == "--") {
alert("Bitte Ihren Namen eingeben!");
document.form.von.focus();
return false;
}
}
document.form.mit_absicht_falsch.focus();


</script>
<meta http-equiv="refresh" content="35; URL=/myhost/index-neu.php">
<title>another test</title>
</head>
<body topmargin="1" leftmargin="1" onLoad="document.forms[0].reset();">


<p>

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<form method="get" action="" name="form" onSubmit="return
chkFormular()">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<input type="text" name="chat_input" size="170" tabindex="1">
</td>
<td>
<input type="submit" value="Abschicken" name="send"
tabindex="2">
</td>
</tr>
<tr>
<td class="bottom_td">
Von:
<select size="1" name="von" tabindex="3">
<option value="--">--</option>
<option selected >b_s</option>
<option>c_g</option>
<option>f_n</option>
</option>
</select>
an:
<select size="1" name="an" tabindex="4">
<option value="--">alle</option>
<option>b_s</option>
<option>c_g</option>
<option>f_n</option>
</select>
Filter
<select size="1" name="filter" tabindex="5">
<option value="--">kein</option>
<option>b_s</option>
<option>c_g</option>
<option>f_n</option>
</select>
Verzögerung: <input type="text" name="delay" size="3"
value="35" tabindex="6">

</td>
<td class="bottom_td">
&nbsp;
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td class="filter">
</td>
</tr>

<tr>
<td>

<table border="0" cellspacing="0" cellpadding="0" ><tr>
<tr bgcolor='#ffffff'>
<td valign='top' width='10' class='von_an_td'></td>
<td valign='top' width='10' class='von_an_td'>--</td>
<td valign='top' width='10' class='datum_td'>06_11:42:39</td>
<td valign='top' width='1200' class='chat_td'>&nbsp;test</td>
</tr>
</table><table border="0" cellspacing="0" cellpadding="0" ><tr>
<tr bgcolor='#ffddee'>
<td valign='top' width='10' class='von_an_td'>b_s</td>
<td valign='top' width='10' class='von_an_td'>--</td>
<td valign='top' width='10' class='datum_td'>06_11:43:00</td>
<td valign='top' width='1200' class='chat_td'>&nbsp;another test</td>
</tr>
</table>
</td>
</tr>
</table>
<script type="text/javascript">

document.form.chat_input.focus();

</script>

<p>

</body></html>


Meta refresh is not advised from w3c quality tips
how you can read here :

http://www.w3.org/QA/Tips/reback

regards

Daniel
 
S

Steve Pugh

I do not want to REDIRECT to another page, I want to RELOAD it - because it
is a "chat" like page.

There is a reason why most chat rooms are not written in HTML.
This is part of that reason.

The focus problem you experience is probably due to the fact that your
JavaScript gives focus to one of the form boxes. Remove that and the
page might continue to happily reload in the background.

Steve
 
S

SpaceGirl

Bruno said:
Thanks - Daniel.
I do not want to REDIRECT to another page, I want to RELOAD it - because it
is a "chat" like page.
regards
Bruno

By default, FireFox disables refresh. So unless you explicitly ask all
of your visitors to turn ON refresh, it may not have any effect.

Use javascript to refresh the content, plus add a reload link. To get
around the page being cached, use server side scripting to modify the
link used for refreshing.

<a href="thispage.asp?randomnumber=214124124">click here to refresh</a>

....is what the browser sees. But server side it looks like this:

<a href="thispage.asp?randonmuber=<%=myrandomnumber%>">click here to
refresh</a>

That means if the user clicks the button, the browser thinks that it is
going to a different page each time and forces it to fetch the page from
the server...



--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
B

Bruno

thanks folks!!!

Regards
Bruno
Bruno said:
Thanks - Daniel.
I do not want to REDIRECT to another page, I want to RELOAD it - because
it is a "chat" like page.
regards
Bruno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top