View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
You can do so by automatically generating a URL and sending the information to the browser:
<script language="javascript">
var totPrice = totItems * price;
window.location.href = 'MyScript.fwx?cost=' + totPrice;
When the above JS code is executed on the browser it:
  1. calculates the value of totPrice
  2. Dynamically creates a URL that points to script MyScript.fwx and includes totPrice in the queryString as a field named "cost".
  3. Automatically redirects the browser to the above URL.

FoxWeb Support Team email

Sent by Gene Gerard on 10/22/2002 07:50:33 PM:

In an earlier post (below) you showed how to convert a Foxpro variable into a Javascript variable.

Can the reverse be done?




You can generate dynamic javascript code, which will contain the value of FoxWeb variables as follows:

<script language="javascript">
var MyJSVariable=<%=M.MyVFPVariable%>
. The rest of your script

FoxWeb Support Team

Sent by Joe Goldsmith on 03/22/2002 06:41:53 PM:
Anyone know if it is any way possible for a javascript to pick up th evalue of a VFP/FW variable?