I have need to submit or kick off multiple requests and have
them process at the same time or synchronously. I've written the
following code to do just that which I can put into a loop.
...
</head>
<script>
window.open("ScriptFlushTest2.cfm");
</script>
Starting Script Flush Test 1.<br>
<br>
<cfflush>
<body>
...
It seems to work fine. Is there anything wrong with this
method or is there a better way?
You might like to look into Ajax to achieve this type of
functionality. Personally I use hidden frames in a similar fashion
to what Dan suggests - make them invisible and then tell them to
run whatever you want. Its also quite easy to send results back to
the calling page.
below is an example - the frame structure is usually placed
in default.cfm (or index.cfm or whatever) and then use javascript
to pass scripts to the frames:
I see your points however this time this was not intended to
be a user run program but a scheduled job run on a server where if,
heaven forbid, there ever was an error I would be able to view the
page and correct it. There are other "pop ups" in our application
that could be hidden so I will imploy your suggestions there.