473,326 Members | 2,114 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,326 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 17 '05 #1
1 1916
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 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

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...
2
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: 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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.