View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   

Thank you for the reply.

 

I'm aware of the verify message and tried your reccomended:

 

<BODY onLoad='window.open("page_3.fwx","1"); window.close()'>

 

It still doesn’t work (I removed the apostrophe and tried it that way too)

 

It appears that after the first “<BODY onLoad=” command is executed, the second one is ignored.

 

 

So perhaps this needs additional explanation on my part.

 

page_3.fwx does not exist an will be created dynamically by a function which is activated in the procs.prg (procs.fxp) when passed the proper parameter, which in this case is '1'  with "=procs(1)"

 

I do not want to put this data on page_1 (as you suggest) . . . but want it on its own separate page which will be formatted to the customer's specifications for report printing, i.e. ‘The Client Wants It That Way’ . . . clean and uncluttered, except for vital info.

 

Page 1 should work in similar fashion to normal client-side applications.

 

Page 1 is a menu of Client requests. Depending which request is selected (image button pushed), Page 2 is then created dynamically with code that calls a procedure from PROCS.PRG and Page 3 is then created dynamically and displayed.

 

The need is for Page 2 (and its 'back' link to Page 1) to go away. A 'Home' button on Page 3 can always allow return to Page 1.

 

The best I can do so far is to create page#2 with a message to ‘close the screen/not needed any more’ . . . but this to me is unprofessional and the screen back button can cause problems if the client returns to page 1 and tries to create another page 3. I’d rather get rid of page 2 completely and have the client click a HOME button on Page 3 to restart his/her procedure.

 

Is there a way of releasing it with a FoxWeb script?

 

I tried putting just the FoxWeb script in Page 2 so that page 2 is not in reality an HTML page . . . but that didn’t work either. A transitional page was generated automatically without the FoxWeb code being executed (no page 3 generated) with the following source code:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD>

<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>

<BODY></BODY></HTML>

 

Meanwhile, I'll keep trying.

 

Regards,

 

Zeke

 

* * * * * * * * * * * * * * * *

 

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.

 

* * * * * * * * * * * * * * * *

 

FoxWeb Support Teamsupport@foxweb.com email

Sent by Gene Gerard on 10/16/2002 12:25:49 PM:

How Do I Automatically Close A Window That's No Longer Needed?

I'm using a combination of Javascript and FoxWeb with the following methodology.

 

Step 1 - a button is clicked on 'PAGE_1.FWX' (html type)

 

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

      with data from 'RECORDS.DBF'

 

   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' :

 

<HTML><HEAD></HEAD>

<% =procs(1) %>

<SCRIPT LANGUAGE="JavaScript">

</SCRIPT></HEAD>

<BODY onLoad=window.open("page_3.fwx","1")>

</BODY></HTML>

 

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' ?

Any ideas?

Gene