T
The Natural Philosopher
Hmm. Thanks to good advice, the screen I am working on is ALMOST working.
Basically I spawn a subscreen if needed from the main screen to allow
the user to add some elements to a drop down <SELECT> list 'on the fly'
as it were.
These elements are added to a database, so I have to reload the main
page in order for the changes to take effect.
Thanks to Erwin, this works using opener.location.reload(true)
HOWEVER. There is one snag: Any data already entered in this pretty
massive form is thereby lost.
Now I am sort of looking for a way to do a SUBMIT instead of a RELOAD in
order that the data can be POSTED back to the server, and will reappear
in the correct fields.
This would be a dummy submit and wouldn't actually update the database.
Although there is no reason why it shouldn't, but if I do an actual
submit/update before calling the sub window, I guess I lose the code
that had decided to do the window spawn...submit being a sort of 'GOTO'
if you like..
In principle the sequence of events I want to see, is this:-
User clicks on something.
This spawns a new window, which independently fiddles with the database.
On closing that window, the main window does a submit(), to force post
data back to the server, and reload it, and the new data.
(I hasten to add that the post data and the new data are independent:
the post data contains an index INTO this new data, but the assumption
is that the index is not valid for that field anyway, since thats why
they clicked..)
Basically I spawn a subscreen if needed from the main screen to allow
the user to add some elements to a drop down <SELECT> list 'on the fly'
as it were.
These elements are added to a database, so I have to reload the main
page in order for the changes to take effect.
Thanks to Erwin, this works using opener.location.reload(true)
HOWEVER. There is one snag: Any data already entered in this pretty
massive form is thereby lost.
Now I am sort of looking for a way to do a SUBMIT instead of a RELOAD in
order that the data can be POSTED back to the server, and will reappear
in the correct fields.
This would be a dummy submit and wouldn't actually update the database.
Although there is no reason why it shouldn't, but if I do an actual
submit/update before calling the sub window, I guess I lose the code
that had decided to do the window spawn...submit being a sort of 'GOTO'
if you like..
In principle the sequence of events I want to see, is this:-
User clicks on something.
This spawns a new window, which independently fiddles with the database.
On closing that window, the main window does a submit(), to force post
data back to the server, and reload it, and the new data.
(I hasten to add that the post data and the new data are independent:
the post data contains an index INTO this new data, but the assumption
is that the index is not valid for that field anyway, since thats why
they clicked..)