By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,296 Members | 1,469 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,296 IT Pros & Developers. It's quick & easy.

refresh without Focus

P: n/a
Hi
I have an application with numerous pages. A couple of these pages
include a functionality that allows it to be refreshed every 15 secs.
My problem is that this "refreshing" works too well: THe page that is
refreshed always comes into focus even when I'm using another page. I
was wondering whether there is a way for the page with the refreshed
functionality to remain in the background.
I thank you all in advance for any suggestions. My constraint is that
the solution must only be php and/or javascript.
Kind regards
Bilal
Jul 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Bilal wrote:
Hi
I have an application with numerous pages. A couple of these pages
include a functionality that allows it to be refreshed every 15 secs.
My problem is that this "refreshing" works too well: THe page that is
refreshed always comes into focus even when I'm using another page. I
was wondering whether there is a way for the page with the refreshed
functionality to remain in the background.
I thank you all in advance for any suggestions. My constraint is that
the solution must only be php and/or javascript.
Kind regards
Bilal


Hi,

What you describe doesn't happen in my situation.
(Linux RH8 with Mozilla1.4.1)

I tested the following script:

<html>
<head>
<script type="text/javascript">
setTimeout("document.location='test.php'" , 2000);
</script>
</head>
<body>
I refresh myself every 2 seconds.
</body>
</html>
Jul 20 '05 #2

P: n/a
This is not what php can do because php is server side, it is javascript
related.
use this js function after your refresh
self.blur();

Savut

"Bilal" <bj****@hotmail.com> wrote in message
news:f9**************************@posting.google.c om...
Hi
I have an application with numerous pages. A couple of these pages
include a functionality that allows it to be refreshed every 15 secs.
My problem is that this "refreshing" works too well: THe page that is
refreshed always comes into focus even when I'm using another page. I
was wondering whether there is a way for the page with the refreshed
functionality to remain in the background.
I thank you all in advance for any suggestions. My constraint is that
the solution must only be php and/or javascript.
Kind regards
Bilal


Jul 20 '05 #3

P: n/a
In article <f9**************************@posting.google.com >,
bj****@hotmail.com enlightened us with...
Hi
I have an application with numerous pages. A couple of these pages
include a functionality that allows it to be refreshed every 15 secs.
My problem is that this "refreshing" works too well: THe page that is
refreshed always comes into focus even when I'm using another page. I
was wondering whether there is a way for the page with the refreshed
functionality to remain in the background.

I don't have this problem with my refreshing window.
Got URL?

--
--
~kaeli~
Dancing cheek-to-cheek is really a form of floor play.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #4

P: n/a
The problem is browsers handle the refresh differently. Even Mozilla didn't
focus the window after a refresh, it's not for all browsers, the best it to
add code to handle it.

Savut

"Erwin Moller"
<si******************************************@spam yourself.com> wrote in
message news:40*********************@news.xs4all.nl...
Bilal wrote:
Hi
I have an application with numerous pages. A couple of these pages
include a functionality that allows it to be refreshed every 15 secs.
My problem is that this "refreshing" works too well: THe page that is
refreshed always comes into focus even when I'm using another page. I
was wondering whether there is a way for the page with the refreshed
functionality to remain in the background.
I thank you all in advance for any suggestions. My constraint is that
the solution must only be php and/or javascript.
Kind regards
Bilal


Hi,

What you describe doesn't happen in my situation.
(Linux RH8 with Mozilla1.4.1)

I tested the following script:

<html>
<head>
<script type="text/javascript">
setTimeout("document.location='test.php'" , 2000);
</script>
</head>
<body>
I refresh myself every 2 seconds.
</body>
</html>


Jul 20 '05 #5

P: n/a
> bj****@hotmail.com enlightened us with...
Hi
I have an application with numerous pages. A couple of these pages
include a functionality that allows it to be refreshed every 15 secs.
My problem is that this "refreshing" works too well: THe page that is
refreshed always comes into focus even when I'm using another page. I
was wondering whether there is a way for the page with the refreshed
functionality to remain in the background.

Hello everyone,
THis is the function I'm using:
function refreshPage(){
document.form_affichage.action=myPage.php';
document.form_affichage.submit();
//document.form_affichage.blur(); --> did not work!!
}
timeout = <?php echo $period;?> * 1000;
window.setTimeout("refreshPage();",timeout);
The browser I'm compelled to use is Internet Explorer vers 6.
Unfortunately I have not got a URL yet. Thank you again for any help.
Cheers
Bilal
Jul 20 '05 #6

P: n/a
In article <f9**************************@posting.google.com >,
bj****@hotmail.com enlightened us with...


Hello everyone,
THis is the function I'm using:
function refreshPage(){
document.form_affichage.action=myPage.php';
Is that a typo? Having only one quote would basically putz up the whole
rest of the code.
document.form_affichage.submit();
//document.form_affichage.blur(); --> did not work!!
}
timeout = <?php echo $period;?> * 1000;
window.setTimeout("refreshPage();",timeout);
The browser I'm compelled to use is Internet Explorer vers 6.


Now, what happens? Another IE window is open, but this window comes into
focus when it refreshes?
Because I put this into a test page and had no problems. It remained in
the background as expected.

My test page:

<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
</head>

<body>
<script>
function refreshPage(){
document.form1.submit();
}
timeout = 5 * 1000;
window.setTimeout("refreshPage();",timeout);
</script>

test page
<form name="form1">
<input type="text" name="text1"><br>
<input type="hidden" name="hidden1" value="nothing">
</form>
</body>
</html>

--
--
~kaeli~
Murphy's Law #3020: Quality assurance doesn't.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #7

P: n/a
your syntax is incorrect.
use self.blur(); or windowname.blur()

Savut

"Bilal" <bj****@hotmail.com> wrote in message
news:f9**************************@posting.google.c om...
bj****@hotmail.com enlightened us with...
Hi
I have an application with numerous pages. A couple of these pages
include a functionality that allows it to be refreshed every 15 secs.
My problem is that this "refreshing" works too well: THe page that is
refreshed always comes into focus even when I'm using another page. I
was wondering whether there is a way for the page with the refreshed
functionality to remain in the background.

Hello everyone,
THis is the function I'm using:
function refreshPage(){
document.form_affichage.action=myPage.php';
document.form_affichage.submit();
//document.form_affichage.blur(); --> did not work!!
}
timeout = <?php echo $period;?> * 1000;
window.setTimeout("refreshPage();",timeout);
The browser I'm compelled to use is Internet Explorer vers 6.
Unfortunately I have not got a URL yet. Thank you again for any help.
Cheers
Bilal


Jul 20 '05 #8

P: n/a
Savut wrote:
This is not what php can do because php is server side,
No, PHP is not restricted to server-side applications, but it is mostly
used server-side. If there were a user agent that had a built-in PHP
parser or could make use of an external PHP parser, and if there were a
PHP module for client-side scripting, there were no problem using PHP
for this task.
it is javascript related.
But not because JavaScript would be restricted to client-side
applications but because it is mostly used client-side.
[Top post]


Please do not do that.
F'up2 cljs

PointedEars
Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.