Link to home
Start Free TrialLog in
Avatar of RBertora
RBertoraFlag for United Kingdom of Great Britain and Northern Ireland

asked on

stay on top window

Ok I am very stuck on this problem.

I have a main page with 2 buttons, pressing a button launches a little popup window
the popup window has content in accordance with the variable passed to it in the url querystring.
1 or 2

The first time I load the main page and click on button1, the Popup window
is created and displays fine.
Then I click on button2 , doing so the Popup window looses focus as the main window
is brought to the front. I alt tab to the Popup window ,and the contents of which
are fine (number 2 content).

The problem is I don't want to have to alt tab to the popup window, is there a way to
make the popup stay on top???

If no one can give me a solution for this then I will delete this question, I have
already spent points searching experts-exchange for an answer, and turned up nothing
of and substance. infact the general concensus is it cannot be done ..

lala lala lala rubbish!

It can be done the question is how?


here is a previous answer that does not work for example:
//   if (document.all) WinHandle = window.showModalDialog("DayView.asp?PersonID="+P+"&TheDate="+D+"&AMPMCode="+C,'arguments','dialogWidth=360,dialogHeight=290')
//   else WinHandle = window.open("DayView.asp?PersonID="+P+"&TheDate="+D+"&AMPMCode="+C,"DetailView",["resizable=0,width=360,height=290,alwaysRaised"]);

and the idea of onbluring setfocusing aslo does not work.


Here is a snippet of my code:



<script Language="JavaScript">

function ShowDetail(num)
{
  var N = num;
  DayWindow = window.open("Popup.asp?num="+N,"DetailView",["resizable=0,width=360,height=290"]);
}

</script>


<input type="button1" value="open win1" onclick="ShowDetail(1)">
<input type="button2" value="open win2" onclick="ShowDetail(2)">


Rob;-)
<no points if you tell me its not possible>
Avatar of DreamMaster
DreamMaster

how about this:

<input type="button1" value="open win1" onclick="ShowDetail(1); window.setTimeout('window.detailview.focus()',500)">
<input type="button2" value="open win2" onclick="ShowDetail(2); window.setTimeout('window.detailview.focus()',500)">

I'm not sure but it might work!

Max Davidse
Avatar of RBertora

ASKER

nope:
window.detailview is not an object...
Rob;-)
>and the idea of onbluring setfocusing aslo does not work

Why?  If you use a hidden frameset with a script that sets focus in the hidden part of the frameset, this should cause the window to stay focused.

If you need help implementing, please let me know...

Kurt
DUHH!!! That's his question Kurt!
Hi,
Yes Kurt please post some code & how to implement it.
Rob;-)
ASKER CERTIFIED SOLUTION
Avatar of loveleen
loveleen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial