1. display a 'Generating .PDF file ...' message
2. call a function to see if the file exists
3. if the file doesn't exist, wait for a second and go back to Step 2
4. if the file exists, then stop the above loop (Steps 2-3) and hide the 'Generating .PDF file ...' message
I've tried a timer, promise, web worker, etc. but, as of yet, no joy.
Anyone have ideas how they would tackle this (or how they have tacked a similar scenario)?
Sent by Art Bergquist on 09/02/2017 11:12:32 PM:
Switching to a cookie did the trick; I can set the cookie via FoxWeb:
Sent by Art Bergquist on 09/02/2017 10:50:08 PM:
I then implemented a hidden field whose value is the name of the .PDF file but when I query that field with either of the following lines:
I get null back both times.
Sent by Art Bergquist on 09/02/2017 09:25:06 PM:
I've got a web page in which I programmatically create an .html file in a certain folder/directory on the server.
My client has ActivePDF's DocConverter running on the server; DocConverter watches that folder/directory so that anytime an .html file gets created there, DocConverter automatically generates a .PDF file from the .html file.
The issue is that when the web page displays with a hyperlink to the .PDF file, the .PDF file has not always been generated yet (in fact, most of the time, the .PDF is not immediately available).
I implemented the following line immediately after initializing the memory variable for the name of the generated .PDF file:
but when the following code gets called from the window.onload event:
it throws an "Uncaught ReferenceError: session is not defined" error.