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

Refining the popup?

I have a page that when the user accesses certain links a chromeless window (2) appears and meshes with the newly formed parent window (1). Works nicely in IE 5+ but in IE 6 it's not so good but OK for now.

Anyway in IE 5;5.5 the chromeless window appears. I have made it so (2) can be moved around on the screen with the mouse and also so that if the parent (1) is minimized leaving (2) only on the desktop when the links in that are clicked, the parent window will focus and that is where the child's (2) link will appear.

I have one last refinement that I'm hoping someone can shed some light on. I have this in the parent:

<script type="text/javascript">
function window_onfocus(){
if (agilePopper){
this.blur();
agilePopper.focus();
}
}
</script>
<!-- -->
<script type="text/javascript">
window.onfocus = window_onfocus;
</script>

The idea here is if the parent window is brought to focus the chromless window agilePopper will stay on top and keep the focus. That's fine but here's my trouble. If there is another window open on the desktop then the parent will fall behind that too. So yes it stays behind agilePopper but also goes behind any other window open on the desktop. I'd prefer it stay right behind agilePopper. Sort of like a z-order (increasing left to right): any open window on desktop - Parent - agilePopper.

If this is not possible using JavaScript that's fine I won't look into it further. But if it is I'd like any suggestions how this might be achieved. Thanks.

--
George Hester
__________________________________
Jul 23 '05 #1
4 2639
Ivo
"George Hester" wrote
The idea here is if the parent window is brought to focus the chromless
window agilePopper will stay on top and keep the focus. That's fine but
here's my trouble. If there is another window open on the desktop then
parent will fall behind that too. So yes it stays behind agilePopper but
also goes behind any other window open on the desktop. I'd prefer it stay
right behind agilePopper. Sort of like a z-order (increasing left to
right): any open window on desktop - Parent - agilePopper.

<script type="text/javascript">
function window_onfocus(){
if (agilePopper){
this.blur();
Remove this line. That answers your question.
agilePopper.focus();
}
}
</script>
<!-- -->
<script type="text/javascript">
window.onfocus = window_onfocus;
</script>
Merge those two script blocks into one. There is no reason to separate them.

--
Ivo


Jul 23 '05 #2


--
George Hester
__________________________________
"Ivo" <no@thank.you> wrote in message news:41**********************@news.wanadoo.nl...
"George Hester" wrote
The idea here is if the parent window is brought to focus the chromless
window agilePopper will stay on top and keep the focus. That's fine but
here's my trouble. If there is another window open on the desktop then
parent will fall behind that too. So yes it stays behind agilePopper but
also goes behind any other window open on the desktop. I'd prefer it stay
right behind agilePopper. Sort of like a z-order (increasing left to
right): any open window on desktop - Parent - agilePopper.

<script type="text/javascript">
function window_onfocus(){
if (agilePopper){
this.blur();


Remove this line. That answers your question.
agilePopper.focus();
}
}
</script>
<!-- -->
<script type="text/javascript">
window.onfocus = window_onfocus;
</script>


Merge those two script blocks into one. There is no reason to separate them.

--
Ivo







New function:

function window_onfocus(){
if (agilePopper){
this.blur();
//agilePopper.focus();
}
}

It doesn't work. Click on the parent once the title bar of the Parent becomes active and agilePopper stays on top. Click again agilePopper falls behind the Parent. Can't have that either. Mine does keep agilePopper always on top no matter how many times the Parent is clicked.

The issue is though that the Parent falls behind every open window on the desktop. Not just agilePopper. Thanks.
Jul 23 '05 #3
Ivo
"Ivo" wrote
"George Hester" wrote
The idea here is if the parent window is brought to focus the chromless
window agilePopper will stay on top and keep the focus. That's fine but
here's my trouble. If there is another window open on the desktop then
parent will fall behind that too. So yes it stays behind agilePopper but
also goes behind any other window open on the desktop. I'd prefer it
right behind agilePopper. Sort of like a z-order (increasing left to
right): any open window on desktop - Parent - agilePopper.

<script type="text/javascript">
function window_onfocus(){
if (agilePopper){
Remove the line below:
this.blur();

Remove the above line.
Remove this line. That answers your question.
agilePopper.focus();
}
}
</script>


Jul 23 '05 #4

"Ivo" <no@thank.you> wrote in message news:41***********************@news.wanadoo.nl...
"Ivo" wrote
"George Hester" wrote
The idea here is if the parent window is brought to focus the chromless
window agilePopper will stay on top and keep the focus. That's fine but
here's my trouble. If there is another window open on the desktop then
parent will fall behind that too. So yes it stays behind agilePopper but
also goes behind any other window open on the desktop. I'd prefer it
right behind agilePopper. Sort of like a z-order (increasing left to
right): any open window on desktop - Parent - agilePopper.

<script type="text/javascript">
function window_onfocus(){
if (agilePopper){
Remove the line below:
this.blur();


Remove the above line.
Remove this line. That answers your question.
agilePopper.focus();
}
}
</script>





Well not sure what your are referring to. As far as I can tell you suggest the function be this:

if (agilePopper){
//this.blur();
//agilePopper.focus();
}
}

Which will definitely error out and does nothing. I have actually fixed the issue somewhat and have noticed some weird behavior. I'll ask in a differrent thread becasue I think this one has run it's course. I really do not understand your directions. Sorry. Thanks.

--
George Hester
__________________________________
Jul 23 '05 #5

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

Similar topics

1
by: Noozer | last post by:
When using the WebBrowser control, is it possible to cause popup windows to appear within the WebBrowser control itself instead of a new window? This is what I've written in the NewWindow2 event,...
1
by: CG | last post by:
Hi, I have an ASP application. On one of my pages I have a link to a popup. This popup has a link. When the user clicks this link my popup closes and another Popup is displayed. In this...
1
by: Ben Wan | last post by:
I got 2 error from the following code below... 1. I couldn't load up the picture since the picture is at (C:\company\image\largePic.jpg) 2. I got a page error in my 'index.html' when calling...
15
by: | last post by:
So many websites can get around my Googlebar's popup blockers. Even Opera 8 can not stop those popups. I looked into the codes, and I can find nothing showing me how it is done. Can anyone help me...
4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
15
by: H00ner | last post by:
Hello All Hope you can help Been pulling my hair out about a popup problem in ASP.NET. One of the forms i wrote requires the user to select a product from a list in a popup web form. the...
18
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead....
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
4
by: jobs | last post by:
the javascript: function ShowTooltip(L1in) { document.getElementById("L1").innerText=L1in; y = event.clientY + document.documentElement.scrollTop; var Popup= document.getElementById("Popup")...
1
by: Mike1961 | last post by:
Hi everyone. I have problem with this function javascript: var popup = null; function OpenPopup(fld, tbl, col, w, h) { var pw = Math.floor((screen.width - w) / 2);
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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: 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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.