473,387 Members | 1,766 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,387 software developers and data experts.

Unfocus a window - during refresh!!

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 different
windows. One of my windows involves an automatic refresh every 99 sec.
The problem is that the window is coming into focus each time the
refresh occurs. How can I prevent this from happening? Thank you in
advance for any suggestions.
Implementation of refresh as follows:
____________________________
function refreshPage(){
query4 = "<?php echo $_GET['query4']?>";
window.location.href = "fluxOT_frame.php?page_id=0&query4=" + query4 +
"&services=<?php echo $service?>&go_ahead=1&code_er=<?php echo
$cod_er?>&code_appli=<?php echo $code_app?>&periode=<?php echo
$period?>";
}
timeout = <?php echo $period;?> * 1000; // where period = 99
window.setTimeout("refreshPage();",timeout);
____________________________
Kind regards
Bils
Jul 23 '05 #1
2 4798
Bilal wrote:
Hi,
I'm a complete beginner in Javascript and php ... so forgive me for
asking an easy/simple solution to the following problem:
And to Usenet as well. It does not help your cause to post the same
message twice in a 10 minute span.

I'm developing an application that involves multi-screen in different
windows. One of my windows involves an automatic refresh every 99 sec.
The problem is that the window is coming into focus each time the
refresh occurs. How can I prevent this from happening?
You can't. To refresh it, it has to gain focus.

Thank you in advance for any suggestions.
Implementation of refresh as follows:
____________________________
function refreshPage(){
query4 = "<?php echo $_GET['query4']?>";
window.location.href = "fluxOT_frame.php?page_id=0&query4=" + query4 +
"&services=<?php echo $service?>&go_ahead=1&code_er=<?php echo
$cod_er?>&code_appli=<?php echo $code_app?>&periode=<?php echo
$period?>";
}
timeout = <?php echo $period;?> * 1000; // where period = 99
window.setTimeout("refreshPage();",timeout);


window.blur();

will cause the page to lose focus. But it won't solve your problem
entirely, as you want focus to go back to where it was to begin with,
and determining what had focus at the time is a little more consuming.

If its in a frameset, then have each page set a variable in the frameset
and each time your page refreshes, check to see what page last had focus
and set it back.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #2
"Bilal" <bj****@hotmail.com> wrote in message
news:f9**************************@posting.google.c om...
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 different
windows. One of my windows involves an automatic refresh every 99 sec.
The problem is that the window is coming into focus each time the
refresh occurs. How can I prevent this from happening? Thank you in
advance for any suggestions.


I'm afraid you have to more specific. I'm not seeing this behavior at all.
In my test, the browser (IE6) refreshes in the background without bringing
itself forward.

Use window.location.reload() to refresh a page, btw.
Jul 23 '05 #3

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...
0
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...
3
by: J P Singh | last post by:
Hi Guys Wonder if someone can help me with this. I have a form where a user clicks a button which gives them a pop up windows to allow them to add the data. The user adds the data and click...
0
by: Greg | last post by:
I have a form that creates and updates a pound table during a postback, and right before I submit the form I do a window.open to launch another page that reads from the pound table which stores...
10
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
3
by: jan | last post by:
I know Window.opener.refresh() does not work if two windows are from a different domain. Anyone a (javascript)-solution for this problem ? tks Jan/
12
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
2
by: Jeremy | last post by:
In other languages I've worked with, there is a way to allow an app to go idle just long enough for its windows to refresh. Can't find this in c#. I did find some discussion of multithreading the...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.