• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFFlush and javascript window.open

Explorer ,
Jul 10, 2007 Jul 10, 2007

Copy link to clipboard

Copied

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?

Thanks.

P.S. CFMX7
TOPICS
Advanced techniques

Views

470

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 10, 2007 Jul 10, 2007

Copy link to clipboard

Copied

Rather than subjecting the user to all these browser windows opening, you might want to open them in little bitty iframes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 10, 2007 Jul 10, 2007

Copy link to clipboard

Copied

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:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 11, 2007 Jul 11, 2007

Copy link to clipboard

Copied

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.

Thank you both.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 11, 2007 Jul 11, 2007

Copy link to clipboard

Copied

If it's a scheduled job your approach won't work at all because you are using javascript, which runs from the client browser.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 11, 2007 Jul 11, 2007

Copy link to clipboard

Copied

LATEST
Our scheduled jobs run in a browser. They are scheduled using Windows scheduled tasks that open a browser and run a particular cfm.

Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation