/    Sign up×
Community /Pin to ProfileBookmark

showModalDialog can’t find the iframe!!!

I create a showModalDialog window.
Inside it I have a FORM and an IFRAME, which is the FORM’s target.
When i submit the FORM (document.frm.submit()? it goes to a new window, not to the IFRAME, which is set as the target of the FORM!

I also tried to access this IFRAME through a 2nd showModalDialog window like this dialogArguments.iframename.open(“somesite.html”);
It did NOT find the IFRAME in the first showModalDialog.

So, I imagine there is a way to tell the showModalDialog window that there is an IFRAME inside it, and tell it to point the target into that IFRAME, I just don’t know how…

To fix the submit problem i sent the form data through the URL and used window.open pointing to the IFRAME. Worked just fine.

But I need to set a value inside this IFRAME through a 2nd window, which is done by using this: dialogArguments.iframename.open(“somesite.html”); (that is the same as saying window.opener.iframename.open(“”)) BUT as it is showModalDialog window, it just doesn’t find the IFRAME, and opens an “_blank” window.

HEEEEEEEEEEEELP ME OUT PLEASE! THIS IS VERY INSANE! Now I wish I never knew the showModalDialog function in the first place 😡

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @themeros spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...