post form data to a modal dialog window

Discussion in 'ASP General' started by Matt, Jun 23, 2004.

  1. Matt

    Matt Guest

    I reposted this question because I really want to accomplish this task.
    Please advise!!


    I want to post the form data (http://server/page1.asp) to a modal dialog
    window (http://server/modaldialog.asp) with a desired height 200px by width
    200px.

    Here's my attempts and problems:

    Attempt #1) In http://server/page1.asp, it has code <form
    action="http://server/modaldialog.asp" method="post" target="_blank">

    In http://server/modaldialog.asp, it has code <body onBlur = "self.focus()">

    It can produce modal dialog window modaldialog.asp, but I want to set the
    width and height of modaldialog.asp.

    Attempt #2) var sReturn = window.showModalDialog("modaldialog.asp", params,
    "dialogHeight:200px; dialogWidth:200px;");

    This is the effect I want. But this is not posting the form data to
    modaldialog.asp.

    Any workarounds to my problems??

    Thanks!!
     
    Matt, Jun 23, 2004
    #1
    1. Advertising

  2. Matt

    Alan Howard Guest

    Look at using window.resizeBy() in the onload method of your modal window -
    and just post to it as per your first attempt below. Any other queries of
    this type might be better asked in a client-side group.

    Alan


    "Matt" <> wrote in message
    news:...
    > I reposted this question because I really want to accomplish this task.
    > Please advise!!
    >
    >
    > I want to post the form data (http://server/page1.asp) to a modal dialog
    > window (http://server/modaldialog.asp) with a desired height 200px by

    width
    > 200px.
    >
    > Here's my attempts and problems:
    >
    > Attempt #1) In http://server/page1.asp, it has code <form
    > action="http://server/modaldialog.asp" method="post" target="_blank">
    >
    > In http://server/modaldialog.asp, it has code <body onBlur =

    "self.focus()">
    >
    > It can produce modal dialog window modaldialog.asp, but I want to set the
    > width and height of modaldialog.asp.
    >
    > Attempt #2) var sReturn = window.showModalDialog("modaldialog.asp",

    params,
    > "dialogHeight:200px; dialogWidth:200px;");
    >
    > This is the effect I want. But this is not posting the form data to
    > modaldialog.asp.
    >
    > Any workarounds to my problems??
    >
    > Thanks!!
    >
    >
    >
    >
    >
    >
    >
     
    Alan Howard, Jun 23, 2004
    #2
    1. Advertising

  3. Matt

    StephenMcC Guest

    Hi,

    As far as I remember, when using modal windows and the 'showModalDialog' method, any info for the modal page/ASP must be passed either in the passed url or via the params parameter, don't think u can pass any submitted form content to it. You be better of submitting to a new window as mentioned and having client script to re-size it on_load.

    Although (u didn't mention this, but) I'm not sure if you can get access to the '.opener' method this way, allowing the new/modal window to communicate with it's parent window to pass any info down/back on modal close etc! For this behaviour may need to use window.open method!

    Stephen
    ..

    "Matt" wrote:

    > I reposted this question because I really want to accomplish this task.
    > Please advise!!
    >
    >
    > I want to post the form data (http://server/page1.asp) to a modal dialog
    > window (http://server/modaldialog.asp) with a desired height 200px by width
    > 200px.
    >
    > Here's my attempts and problems:
    >
    > Attempt #1) In http://server/page1.asp, it has code <form
    > action="http://server/modaldialog.asp" method="post" target="_blank">
    >
    > In http://server/modaldialog.asp, it has code <body onBlur = "self.focus()">
    >
    > It can produce modal dialog window modaldialog.asp, but I want to set the
    > width and height of modaldialog.asp.
    >
    > Attempt #2) var sReturn = window.showModalDialog("modaldialog.asp", params,
    > "dialogHeight:200px; dialogWidth:200px;");
    >
    > This is the effect I want. But this is not posting the form data to
    > modaldialog.asp.
    >
    > Any workarounds to my problems??
    >
    > Thanks!!
    >
    >
    >
    >
    >
    >
    >
    >
     
    StephenMcC, Jun 23, 2004
    #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. Matt
    Replies:
    1
    Views:
    3,196
    Whitecrest
    Jun 1, 2004
  2. Matt
    Replies:
    1
    Views:
    493
    Whitecrest
    Jun 20, 2004
  3. Matt
    Replies:
    2
    Views:
    2,039
    Mitja
    Jun 23, 2004
  4. Matt
    Replies:
    2
    Views:
    403
  5. Matt
    Replies:
    0
    Views:
    234
Loading...

Share This Page