Also, this same methodology is being used for the following flow of pages:
A - Home Page (HTML)
B - Login Page - client enters login id (FWX)
C - Client Page - 2 category drop-down lists, (FWX)
various Radio Buttons & Check Boxes
and date range components
CD - Loader page that allows D to be loaded from C (FWX)
D - Client Query Results Page - suitable for printing (HTML)
The pages I'm working on now are A, B & C. The 'window-close' problem is between pages C and D.
The best I can do now is when I click page C to go to page D, a loader page CD loads D.
D then momentarily displays because it is executing a command to close page CD. It then goes back to CD with the security message asking the user if it is ok to close. When the page CD is closed, D displays.
Sent by FoxWeb Support on 10/16/2002 05:31:11 PM:
I dont' understand why you would need to dynamically create an FWX file. Why not have a standard FWX file that dynamically creates HTML output, based on the data in RECORDS.DBF?
Also, what's the reason for opening a separate window to display page_3.fwx, if you are going to close the current window anyway? Why not display the results in the current window?
In any case, if you want to close the current window right after you open the new window, you can simply use the window.close() method:
<BODY onLoad='window.open("page_3.fwx","1"); window.close()'>
Note that, unless the current window was opened programatically, the browser will ask you to verify that you want to close it.
Sent by Gene Gerard on 10/16/2002 12:25:49 PM:
How Do I Automatically Close A Window That's No Longer Needed?
Step 2 - a link is performed to 'PAGE_2.FWX' (html type)
Step 3 - FoxWeb script in 'PAGE_2.FWX' calls a function from a 'Procedure Library' program called 'PROCS.FXP' (prg type). This procedure dynamically
a. creates 'PAGE_3.FWX' which is populated
b. linls to 'PAGE_3.FWX'
All this has been accomplished and works fine. The problem is that 'PAGE_2.FWX' is no longer needed. It is easy to put a text or button link on it to close the window but I would like this to occur automatically.
I've tried various variations of closing the screen, even with the timer but nothing has worked so far. Here's the working code in 'PAGE_2.FWX' :
I looked at the popup timer functions without success (this window is not a popup anyway). Can code maybe be put in 'PAGE_3.FWX' that when loaded, would close 'PAGE_2.FWX' ?