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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michel PlungjanIT ExpertCommented:,'nameOfFrame')

ZvonkoSystems architectCommented:
Or like this:

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

Or this:

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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michel PlungjanIT ExpertCommented:
not if the opener is gone, then you can only use with nameOfWindowOrFrameor a link with target=nameOfWindowOrFrame
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

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.