Results 1 to 3 of 3

Thread: Parent form submit from modal window

  1. #1
    Join Date
    Oct 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Parent form submit from modal window

    1) Script Title: Modal.js (????)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...dhtmlmodal.htm

    3) Describe problem: Can anyone tell me a way to submit the parent form from a Modal window? The modal window is implemented as an iframe. I can update form fields in the parent from the modal window (parent.document.getElementById("parent form item").value = value but i can't submit the form. I've tried parent.document.submit(); but this gives a 'Object doesn't support this property or method' error.

    Thanks, PG

    (Apologies if i'm hogging the forum a bit lately)
    Last edited by perl_geek; 11-04-2011 at 08:31 AM. Reason: Amend subject (resolved)

  2. #2
    Join Date
    Oct 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Resolved

    parent.document.forms[0].submit();

  3. #3
    Join Date
    Oct 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Only partially resolved

    The resolution answer i posted (parent.document.forms[0].submit();) works fine for modal windows opened using an iframe. However, i haven't been able to find anything that will provide the same functionality (submit parent window/frame from pop-up modal window) when the modal pop-up window is opened using a DIV. Would anyone be able to suggest a solution?

    Thanks, PG

Bookmarks

Posting Permissions

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