How to set Window.Opener to set a specific frame in a window

Hello Experts-

My problem I believe is very specific Javascript, DHTML.
Our System: ASP, Javascript and HTML
Client's System: SAP OCI (SRM)

Project:  I work for a printing company and I am trying to integrate our online ordering system with one of customers SAP system using SAP OCI process.  Our customer's employees visit the SAP system of the client and click on a link to be redirected to our website. Once in our website, the user completes the order and checks out of our system. When a user checks out of our system, he will be automatically redirected to the client's website and the shopping cart will be updated on our customer's end.

What is passed between the two websites: Our client's system passes a HookURL each time a user comes in and during the check out process we setup the Window.Opener to the HOOKURL so the shopping cart is automatically updated.


window.opener.location.href = HOOK_URL;

Challenge:  Everything works, but one SMALL issue. Once my window passes the reference to the Window.Opener, it does not point to the right frame.  It refreshes the whole Window instead of the actual frame that has opened this pop up.

Can someone help
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

ZvonkoConnect With a Mentor Systems architectCommented:
Or like this:

window.opener.frames['nameOfTheFrame'].location.href = HOOK_URL;

Or this:

window.opener.frames.nameOfTheFrame.location.href = HOOK_URL;

Michel PlungjanConnect With a Mentor IT ExpertCommented:,'nameOfFrame')

Michel PlungjanIT ExpertCommented:
not if the opener is gone, then you can only use with nameOfWindowOrFrameor a link with target=nameOfWindowOrFrame
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

ZvonkoSystems architectCommented:
Also it is to early immediately after theForm.submit() on client side to refresh the target frame.
Better would be to place in the server side submit response page the script for the target frame refresh.
So put the statement proposed by Michel in the server submit response page like this:
sunnysaranAuthor Commented:
Zvonko, MIchael and mplugjan- Thank you folks for helping out.

I think Zvonko's recommendation is close. I made some progress from last week. I used the statement below to fix this.

window.opener.parent.frames("APPLICATION").location.href = HOOK_URL

And now it does refreshes, the page, but I have two new problems.

a. The parent Frameset has 3 frames. The left menu disappears, but the top header is still in tact. (This is the actual progress, because the top header is still displayed).

b. Second problem is the APPLICATION frame is now not scrolling.

Any comments on how to fix this? I would appreciate some help.
ZvonkoSystems architectCommented:
Show your frameset structure please.
sunnysaranAuthor Commented:

Finally it works. The concept was nested frames.

window.opener.parent.frames("APPLICATION").frames("IACFrame").location.href = HOOK_URL
ZvonkoSystems architectCommented:
Nested or not nested, the solution proposed by Michel has to work for you. So the assumption is that you did not type it correctly:,'IACFrame')

Open in new window

Michel PlungjanIT ExpertCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
All Courses

From novice to tech pro — start learning today.