lol, I'd just looked at the key of the solution and then applied it to my project. I didn't even notice the typo yet :)
: Hi,
:
: Oh, I made a typo ...
:
: of course it's <frame src="" ...
:
:

:
: Hope you haven't tried it and got nice grey windows...
:
: : <frameset onload="alert('Frames loaded');">
: : <frames src="process.htm" name="process">
: : <frames src="output.htm" name="output">
: : </frameset>
:
:
: : Thanks, I'll try it. The 2nd one is probably what I was looking for
: :
: : : Hi again,
: : :
: : : Sorry, I forgot you worked with frames...
: : :
: : : Well basically this will not change the concept but as you want both frames loaded (process first and output second)
: : :
: : : To check:
: : :
: : : 1. If the complete frameset has loaded (the first time only, when changing individual frames later it will not work) put this into your index page or where you define your frames:
: : :
: : : <frameset onload="alert('Frames loaded');">
: : : <frames src="process.htm" name="process">
: : : <frames src="output.htm" name="output">
: : : </frameset>
: : :
: : : 2. If the individual frame has loaded
: : :
: : : a, Define a global variable in the frameset page.
: : : <script language="javascript">
: : : var loaded = false;
: : : </script>
: : : b, Put this into the output.htm:
: : : <body onload="loaded = true">
: : : c, Put this into the process.htm:
: : : <script language="javascript">
: : : if parent.output.loaded == true
: : : { }
: : : </script>
: : :
: : : or
: : :
: : : <script language="javascript">
: : : if (typeof (parent.output.loaded != "undefined"))
: : : { process calculations here }
: : : </script>
: : :
: : : Get back to me how it works...
: : :
: : : Thanx,
: : :
: : : Lillu
: : :
: : : : I'd written this message before, but forgot to click Post, just Preview and then closed my browser. So here it goes again :)
: : : :
: : : : I have one visible frame (output) and one hidden frame (process).
: : : : output contains this code (actually it doesn't - this is an example to illustrate my point)
: : : :
: : : : function writeOut(text) { document.write(text); }
: : : : writeOut("1- Starting your calculation");
: : : : parent.process.location.href = "calculate.pl?command=3+5";
: : : : // xxx
: : : : writeOut("4- That's all folks. You can try again if you want");
: : : : // ... some more writeouts ...
: : : :
: : : :
: : : : The output in the invisible frame will be
: : : : <SCRIPT>parent.output.writeOut("2- Calculating: 3 + 5"); parent.output.writeOut("3- The result is <b>8</b>");</SCRIPT>
: : : :
: : : : The only problem is, that the lines are output in the order 1 - 4 - 2 - 3. So obviously line 4 is printed before the (quite large) .pl-script has been completely loaded and gets the chance to print it's lines.
: : : : Of course I can work around this by putting all lines from the 2nd writeOut and downwards in a separate function (footerText()) which is then called by the Perl-script after the result of the calculation has been printed, but I'd rather just replace the 'xxx' with some code that waits for the Perl-script to complete.
: : : :
: : : : Hope you can help. I tried several tricks with parent.output (like .loaded and .readyState) but they all yield an 'undefined'
: : : :
: : :
: : :
: :
: :
:
: