Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VBScript Javascript
Hello,
 
wondering if people can help me or if my way of thinking wont work. I am not a coder so i dont get to involved in writing, just learn as i go. Anyway
 
i have webpage 1 that refreshes every 5 mins. This page launches a popup.
 <script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body  önload="MM_openBrWindow('call_notice.html','CallWaiting','width=200,height=200')">"
 
No if this page is currently in the background the popup also appears in the background. i need this page to come to the foreground to notify the user that the pages has refreshed. Popup has the following code: 
<body onblur="self.focus()"  önload="self.focus()">
<p align="center" class="style1">You have a call. </p>
<p align="center" class="style1">Please close this window to continue.</p>
<p align="center" class="style1"> </p>
<form method="post">
  <div align="center">
    <input type="button" value="Continue" 
 önclick="window.close()">
  </div>
</form>
 
I have tried set.focus seen some setforegroundwindow, but cant it to work. seen z-order but that doesnt make sens to me.
 
any one got any ideas on how i can do it? or has something that monitors windows titles and executes something?
 
any help would be great. i dont write from scratch but take bits here and there just to let you now what type of person you are dealing with.
Posted 31-May-11 15:20pm
Edited 31-May-11 16:57pm
thatraja242.5K
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

you can use to do that
window.showModalDialog(call_notice.html);
by this u can do that
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

where do i put this? do i put it in the page that is launching the popup or in the popup pages itself?
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 5,130
1 DamithSL 4,237
2 Maciej Los 3,700
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,846


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 1 Jun 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100