/    Sign up×
Community /Pin to ProfileBookmark

trying to call parent window from child window (window.opener)?

I’m trying to get a child window to call a function on a parent window:

[url]https://www.dropbox.com/s/gle9sou3gj770ej/WindowOpenerPOC.zip[/url]

LaunchPage.html is used to open ResolveCaseDialog.html. The Submit button on ResolveCaseDialog submits the selected “Resolution Type” value to window.opener.ProcessReturnValue().

However, when I click the Submit button, the ResolveCaseDialog js throws the following exception: “Uncaught SecurityError: Blocked a frame with origin “null” from accessing a frame with origin “null”. Protocols, domains, and ports must match.”

Can you please take a look at this setup and let me know if there’s a trick to making this work that I’m missing?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliFeb 21.2014 — I wrote these scripts years ago for this very purpose, go to [url=http://www.webapplikations.com/pages/html_js/frames.html?menu_id=Web_sub]this link for frame examples[/url] and [url=http://www.webapplikations.com/pages/html_js/window.html?menu_id=Web_sub] click this link for window examples[/url] and see if they help you understand how the communication between frames and windows can be achieved using javascript.
Copy linkTweet thisAlerts:
@rootFeb 23.2014 — I read that in HTML5, framesets are now removed.

Also to the Original Poster, can you post your code and wrap it in the appropriate forum code tags.
×

Success!

Help @web_guy_2020 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 6.15,
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: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

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