Discussion Locked

Javascript - Parent window refresh

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi!

When a user clicks on a button 'complete this order' on a page that lists orders it opens another window with an invoice for the user to print off.
The invoice window is opened using window.open ( etc.
The ASP behind the invoice window makes changes to the database that effect the parent window where the 'complete this order button is'. How do I refresh the parent window????????
Feel free to drop me an email jantkea@progressivebiz.com for more info. also I will not screw you around if you help me you will get points - just see my previous questions...

7 replies

by geoffreyc

You can reference the parent window from javascript in the invoice window using opener.document.[parts] to get a refresh of the existing document include this code in the invoice window:

opener.document.location.reload, though my reference says this will only work in Netscape 4+, the book is older than IE 5. You could update individual elements using opener.document.myform.textbox.value etc.

Hope it's some help...

by jantkea

You sound like you are on the right track. What do you mean by [parts] ? I'm online right now so when I get the answer I will check it out very quickly.
Thanx

by geoffreyc

I have posted an email regarding accessing elements in parent page via opener.document.elementName.properties and calling functions in opening page using window.opener.functionName() to clarify previous answer.

This discussion is closed to new replies.