View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
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;
</script>
 
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
support@foxweb.com 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?


Regards,

Gene

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

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
.
</script>


FoxWeb Support Team
support@foxweb.com

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?

Joe