473,385 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

refresh without Focus

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
8 5138
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
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
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
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
> 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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bilal | last post by:
Hi, I'm a complete beginner in Javascript and php ... so forgive me for asking an easy/simple solution to the following problem: I'm developing an application that involves multi-screen in...
43
by: dan baker | last post by:
I have a page that gets loaded with a meta-refresh hardcoded so that a few things on the page get updated. its kind of a fake chat board. anyway, what I need to do is turn off the meta-refresh once...
14
by: Shiperton Henethe | last post by:
Hi Is there anyway to get a meta refresh to do so in an new browser window? e.g. This code forwards this user after 8 seconds... <meta http-equiv=refresh...
4
by: Alejandro Narancio | last post by:
Hi, i have this situation. One page open another page in a separated instance of the browser, i neek to refresh every five minutes the first page but without take the focus, anybody know how can i...
0
by: Brad White | last post by:
Overview: I have a custom web app that has an 'Inbox' that refreshes every 30 seconds. One user uses Outlook to host the web page. Using IE, the refresh works fine. If the user is working in...
5
by: jobi | last post by:
Hi, I'm trying to develop this vb.net application which gathers info. When I start the gathering process, I refresh text-fields in the form to see progress and to see where it gets. This works...
2
by: AA | last post by:
Do anyone know how to refresh the datagrid without setting datasource to nothing and initialize the grid again? My case is that I have form consisting from two part. The upper part is a datagrid...
13
by: steven | last post by:
A monthcalendar checks every 2 minutes if theres a new day. Does anyone knows how to disable this ? The problem is that, everytime a monthcalendar checks this, the form where the monhcalendar is...
5
by: mattcolenutt | last post by:
Scenario: Have a product form with an "image location" field. The image property uses this field to display the image. Problem: If an image location field has been changed, the image will not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.