how to do window.open.href in IFrame popup window to submit main form

Hi,
I am working with IFrame
currently I have one main form i.e project, Inside an IFrame exists.
In IFrame, I have button, If I click a button, this will open a popup window.
In popup window I am doing some process. After completion of process, if click OK button,
through Javascript : I am posting the page through URL
 currently
I am using window.opener.href function, this function is doing in IFrame workarea(i.e URL connecting in IFrame)

MyCase is "I want to post the main form when I click on OK button in PopupWindow"
Is there any process, to submit main form.


AllegisIndiaAsked:
Who is Participating?
 
RoonaanConnect With a Mentor Commented:
Try:
window.opener.parent.document.forms['main'].submit();

-r-
0
 
ZvonkoConnect With a Mentor Systems architectCommented:
And if your main form is not named "main" then you can use Roonaan's proposal with the index to the first form:

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

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.