Popup windows question...

Discussion in 'Javascript' started by Kevin Lam, Apr 11, 2005.

  1. Kevin Lam

    Kevin Lam Guest

    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
     
    Kevin Lam, Apr 11, 2005
    #1
    1. Advertisements

  2. Kevin Lam

    kaeli Guest

    In article <>,
    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
     
    kaeli, Apr 11, 2005
    #2
    1. Advertisements

  3. Kevin Lam

    RobB Guest

    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]
     
    RobB, Apr 11, 2005
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Sm9obiBXYWxrZXI=?=

    Popup Window Popup Timing

    =?Utf-8?B?Sm9obiBXYWxrZXI=?=, Nov 4, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,096
    =?Utf-8?B?Sm9obiBXYWxrZXI=?=
    Nov 4, 2005
  2. dapkniht
    Replies:
    1
    Views:
    1,522
    Eliyahu Goldin
    Mar 8, 2006
  3. Dr. X
    Replies:
    1
    Views:
    581
    Saravana
    Jul 22, 2003
  4. Rajesh
    Replies:
    0
    Views:
    807
    Rajesh
    Jul 31, 2007
  5. Urs Gubler
    Replies:
    0
    Views:
    313
    Urs Gubler
    Jul 2, 2003
  6. David Graham

    how do you only allow a popup to popup once

    David Graham, Nov 18, 2003, in forum: Javascript
    Replies:
    4
    Views:
    231
    kaeli
    Nov 18, 2003
  7. Alex Shinn

    mac ie popup of a popup security error

    Alex Shinn, Feb 19, 2004, in forum: Javascript
    Replies:
    1
    Views:
    177
    Alex Shinn
    Feb 19, 2004
  8. Jens Peter Hansen
    Replies:
    7
    Views:
    867
    Randy Webb
    Jun 19, 2004
Loading...