Posting data back to a modal dialog window

Discussion in 'ASP .Net' started by John, Jul 7, 2003.

  1. John

    John Guest

    Hi all,

    I have a modal dialog window from which a user selects a few rows from a
    datagrid and then clicks on an image button. My question is two-fold:

    1. How do I post data back to the same dialog window?

    2. The dialog window in question was, in turn, created from a dialog window.
    I need to post data back to that one too (that which the user selected in
    the top-most dialog window). How do I send data back to this window?

    Regards
    John.
    John, Jul 7, 2003
    #1
    1. Advertising

  2. John

    Angus Logan Guest

    Hi John,
    Posting back in a modal dialog box has not worked for me in the past.

    I woud like to see if it works for you?

    Cheers,
    Angus

    "John" <> wrote in message
    news:...
    > Hi all,
    >
    > I have a modal dialog window from which a user selects a few rows from a
    > datagrid and then clicks on an image button. My question is two-fold:
    >
    > 1. How do I post data back to the same dialog window?
    >
    > 2. The dialog window in question was, in turn, created from a dialog

    window.
    > I need to post data back to that one too (that which the user selected in
    > the top-most dialog window). How do I send data back to this window?
    >
    > Regards
    > John.
    >
    >
    Angus Logan, Jul 7, 2003
    #2
    1. Advertising

  3. Hi

    2 ways to post to a dialog

    1 Place a iframe/frameset in the dialog and host the page there
    2 <base target="_self">

    Returning value to the opener:
    ( Iframe )
    parent.window.returnValue = theValue;
    parent.window.close();

    ( Frameset )
    top.returnValue = theValue;
    top.close();

    (<base target="_self"> )
    window.returnValue = theValue;
    window.close();

    Getting value in the opener
    var res = showModalDialog(........);
    if(typeof(res) != "undefined") alert(res);

    If returning more than 1 value you can use comma delimited.....

    More info
    http://msdn.microsoft.com/library/d...hor/dhtml/reference/dhtml_reference_entry.asp
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jsoriJScript.asp

    --
    Best Regards
    Vidar Petursson
    ==============================
    Microsoft Internet Client & Controls MVP
    ==============================
    "John" <> wrote in message
    news:...
    > Hi all,
    >
    > I have a modal dialog window from which a user selects a few rows from a
    > datagrid and then clicks on an image button. My question is two-fold:
    >
    > 1. How do I post data back to the same dialog window?
    >
    > 2. The dialog window in question was, in turn, created from a dialog

    window.
    > I need to post data back to that one too (that which the user selected in
    > the top-most dialog window). How do I send data back to this window?
    >
    > Regards
    > John.
    >
    >
    Vidar Petursson, Jul 7, 2003
    #3
    1. Advertising

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. DM
    Replies:
    0
    Views:
    387
  2. Matt
    Replies:
    1
    Views:
    3,127
    Whitecrest
    Jun 1, 2004
  3. Matt
    Replies:
    0
    Views:
    213
  4. Russell
    Replies:
    2
    Views:
    267
    Russell
    Sep 13, 2004
  5. gopal srinivasan
    Replies:
    0
    Views:
    220
    gopal srinivasan
    Nov 5, 2004
Loading...

Share This Page