Connecting Tech Pros Worldwide Help | Site Map

Popup windows question...

  #1  
Old July 23rd, 2005, 08:07 PM
Kevin Lam
Guest
 
Posts: n/a
Hi all,

I am writing an application which requires using a popup windows to
edit the detail of a record.

The popup windows is created by it's parent which shows the detail of
the record, which also has a button to delete the record.

My question is that, how do I make the popup to stay on top of the
parent all the time (to make sure, the record is not deleted when I am
trying to edit it via the popup...)

I have tried using a loop to keep the popup stay on focus... but since
my popup has a drop down selection box, the loop doesn't allow me to
have enough time to choose the option before the popup request a focus
again...

Can anyone help please

Thx
  #2  
Old July 23rd, 2005, 08:07 PM
kaeli
Guest
 
Posts: n/a

re: Popup windows question...


In article <e9df0da0.0504110301.22168eb6@posting.google.com >,
sorchu_bf@hotmail.com enlightened us with...[color=blue]
> Hi all,
>
> I am writing an application which requires using a popup windows to
> edit the detail of a record.
>
> The popup windows is created by it's parent which shows the detail of
> the record, which also has a button to delete the record.
>
> My question is that, how do I make the popup to stay on top of the
> parent all the time (to make sure, the record is not deleted when I am
> trying to edit it via the popup...)[/color]

Are you sure this solves the problem?
B/c it doesn't sound right to me.
Double-check your logic here before moving on.

(are you sure it can't be deleted by another user while the current one is
editing it?? do you lock it? why not just fail gracefully if the record isn't
there?)
[color=blue]
>
> I have tried using a loop to keep the popup stay on focus... but since
> my popup has a drop down selection box, the loop doesn't allow me to
> have enough time to choose the option before the popup request a focus
> again...
>
> Can anyone help please[/color]

For MSIE only, use modal dialog.
If you need it to work in other browsers, I'd recommend not using popups at
all for this, as trying to make a modal dialog work cross-browser can be a
PITA. Use a floating div that gets the content from the server instead.

--
--
~kaeli~
A plateau is a high form of flattery.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

  #3  
Old July 23rd, 2005, 08:07 PM
RobB
Guest
 
Posts: n/a

re: Popup windows question...


Kevin Lam wrote:[color=blue]
> Hi all,
>
> I am writing an application which requires using a popup windows to
> edit the detail of a record.
>
> The popup windows is created by it's parent which shows the detail of
> the record, which also has a button to delete the record.
>
> My question is that, how do I make the popup to stay on top of the
> parent all the time (to make sure, the record is not deleted when I[/color]
am[color=blue]
> trying to edit it via the popup...)
>
> I have tried using a loop to keep the popup stay on focus... but[/color]
since[color=blue]
> my popup has a drop down selection box, the loop doesn't allow me to
> have enough time to choose the option before the popup request a[/color]
focus[color=blue]
> again...
>
> Can anyone help please
>
> Thx[/color]

<script type="text/javascript">

var ftimer = null;
var OK2focus = true;

self.onblur = function()
{
ftimer = setTimeout('if(OK2focus)self.focus()', 100);
}

</script>
..........
..........
<select onfocus="OK2focus=false;" onblur="OK2focus=true;self.onblur()">

[untested]

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to implement Web Popup windows using User Interface Process Application Block Marco Vasquez answers 1 November 20th, 2005 10:51 AM
WebBrowser not catching popup windows Chris LaJoie answers 1 November 15th, 2005 06:19 AM
Objects and popup-windows JonQuark answers 2 July 23rd, 2005 07:20 PM
Popup windows show status bar Terry answers 4 July 22nd, 2005 01:16 AM