Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Posts
    12

    Unanswered: how to submit the form of childwindow???

    Hi all

    on clickof a button i open a childwindow and input some details in that childwindow. so on click of the submit button i want to submit the form to another page and update the database and return back to the child window or parent window which ever is possible.

    please help in this issue. its very critical for me.

    thanks
    arun

  2. #2
    Join Date
    Jul 2002
    Posts
    55
    So you want the form in the child window to submit to a different page and then return to the parent or child window? Without lots of complex JavaScript-related shenanigans, this is pretty easy to do with ASP. When you open the child window from the parent, pass the URL of the parent window to it. Store this as a hidden form variable in the child window's form.

    The child window's form should have action="" set to whatever page you wish to submit to and importantly, target="_parent". When you submit to the other page, do all your database processing and then Response.Redirect to the submitted URL form variable, which will then reload the parent page again in the parent window.

    I'll leave closing the child window when you submit it, down to you. It's not that difficult; you need to wrap a JavaScript handler around the onSubmit event for the form which executes window.close() after calling form.Submit().

  3. #3
    Join Date
    Oct 2002
    Posts
    12
    thanks mulligan

    Originally posted by Mulligan
    So you want the form in the child window to submit to a different page and then return to the parent or child window? Without lots of complex JavaScript-related shenanigans, this is pretty easy to do with ASP. When you open the child window from the parent, pass the URL of the parent window to it. Store this as a hidden form variable in the child window's form.

    The child window's form should have action="" set to whatever page you wish to submit to and importantly, target="_parent". When you submit to the other page, do all your database processing and then Response.Redirect to the submitted URL form variable, which will then reload the parent page again in the parent window.

    I'll leave closing the child window when you submit it, down to you. It's not that difficult; you need to wrap a JavaScript handler around the onSubmit event for the form which executes window.close() after calling form.Submit().

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •