Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Popup windows question...

Reply
Thread Tools

Popup windows question...

 
 
Kevin Lam
Guest
Posts: n/a
 
      04-11-2005
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
 
Reply With Quote
 
 
 
 
kaeli
Guest
Posts: n/a
 
      04-11-2005
In article <(E-Mail Removed) >,
http://www.velocityreviews.com/forums/(E-Mail Removed) enlightened us with...
> 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...)


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?)

>
> 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


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

 
Reply With Quote
 
 
 
 
RobB
Guest
Posts: n/a
 
      04-11-2005
Kevin Lam wrote:
> 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


<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]

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Watir Javascript popup handler: How to handle the popup dialog? Rajesh Ruby 0 07-31-2007 04:36 AM
ASP.NET JavaScript Popup, No Popup Using Back Button dapkniht ASP .Net 1 03-08-2006 08:49 AM
Popup Window Popup Timing =?Utf-8?B?Sm9obiBXYWxrZXI=?= ASP .Net 3 11-04-2005 07:33 PM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM
trigger event on opener from popup when closing it or run opener script from popup Urs Gubler Javascript 0 07-02-2003 02:08 PM



Advertisments