View Full Version : problem posting multiple forms from iframe

05-07-2004, 05:11 PM
Good morning y'all! Thanks in advance for the help.

I have a timing problem on a page positing two different forms-

I have an iframe on a page - the parent has header info and titles for the iframe, the iframe has line item detail info.

I have one submit button - on the parent - it submits the form in the iframe with the details, then submits the parent form so everything will be refreshed.
(Code snippets below)

client side logic is -
posts detail info to "SaveDetail", posts parent to "Refresh Screen"
server side logic is -
"SaveDetail" saves form detail in session variables,
"Refresh Screen" builds screen from session variables

Everything works great until the number of items in iframe form goes over 20.
Then it takes longer for the detail to complete the post and the "RefreshScreen" begins before the data is saved. So it looks like the changes have not been recorded - but if I refresh the screen - everything is there!

I've tried a number of things but havn't come up with anything to ensure the iframe finishes posting before the parent posts!


The submit button executes the following script "submit_PricingRecordsFrame()"

function submit_PricingRecordsFrame(){
refreshscreen = parent.PricingRecordsFrame.formCheck_PricingRecords("Update");
if (refreshscreen == true){ formCheck_PricingMain(); }

function checkPricingRecordsFrame(){
if (document.frames["PricingRecordsFrame"].document.readyState == "complete") return;
else setTimeout("checkPricingRecordsFrame()",1000);

function formCheck_PricingRecords(cmd){
document.PricingRecords.click.value = cmd;
return true;

function formCheck_PricingMain(cmd)
document.PricingMain.click.value = cmd;