General discussion

Locked

Javascript - Parent window refresh

By jantkea ·
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...

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Javascript - Parent window refresh

by GeoffreyC In reply to Javascript - Parent windo ...

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...

Collapse -

Javascript - Parent window refresh

by jantkea In reply to Javascript - Parent windo ...

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

Collapse -

Javascript - Parent window refresh

by brandonh In reply to Javascript - Parent windo ...

I think you need to use window.opener.open(URL of main page). This should cause the main window to reload the URL you specify (which can be the same as it's current URL).

I typically use http://developer.netscape.com/docs/manuals/communicator/jsref/index.htm as my JavaScript reference. It covers just about everything.

Hope this helps.

Collapse -

Javascript - Parent window refresh

by jantkea In reply to Javascript - Parent windo ...

Poster rated this answer

Collapse -

Javascript - Parent window refresh

by GeoffreyC In reply to Javascript - Parent windo ...

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.

Collapse -

Javascript - Parent window refresh

by jantkea In reply to Javascript - Parent windo ...

Thanks you have been a great help

Collapse -

Javascript - Parent window refresh

by jantkea In reply to Javascript - Parent windo ...

This question was closed by the author

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Related Discussions

Software Forums