Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to perform a submit from a window's ONLOAD

Status
Not open for further replies.

klawuhn

Programmer
Joined
Feb 19, 2002
Messages
4
Location
US
I have two open windows. One window shows status information, window A, and another takes user input and updates a database, window B. Both windows are created by a servlet. Window B is created by pressing a HREF on window A that sends a command to the servlet with a new window as the target.

My question is after the user submits changes to the servlet from window B and the data is updated in the database, how do I get both windows to refresh? Refreshing window B, where the request originated from is no problem. However getting window A to update has been a problem.

I've tried to submit window A's refresh request from the second window's ONLOAD but it wouldn't let me do the submit(). The only way I have found to update window A is to provide a button on window B to perform this specific action.

I would like to eliminate the extra button push if this is possible.

Any ideas?
 
Try this on your page B (just change the frmTest to the name of your form):

<body onload=&quot;document.frmTest.submit&quot;>

I hope this helps.
 
The frame in window A is called orderdetail. When I execute the following, document.orderdetail.submit;, from window B, I get an error stating that 'document.orderdetail.submit' is null or not an object.

The framing in window A is the following. I am trying to simulate a click on a HREF in the orderdetail frame.
eProjectTracking
logo1
trackingdata
orderheader
orderdetail
orderlist
bottommenu
 
eh, its probably just me, but im not clear on what you want, either way:
you could REFRESH window A from window B like this, i believe:
Code:
// in window B
opener.document.reload;
// to refresh the form..
opener.document.orderdetail.reload;
to submit a form from window B
Code:
opener.document.formname.submit
// in a frame...
opener.document.orderdetail.formname.submit;

hope this helps
Succees, thats the way you spell success!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top