You can achieve this by including the value in a subsequent call to your script. The value can either be passed in the query string, or as a form field.
document.location.href = 'MyScript.fwx?NO=' + cNo;
-or-
document.MyForm.field1.value = cNo;
document.MyForm.submit();
FoxWeb Support Team support@foxweb.com email |
Sent by Ali Koumaiha on 07/27/2005 02:28:19 PM:
Hello again,
I have a JS function that basically multiply qty*price and updates a text box on my page.
this is the function:
function UpdateTotal(cNo,cQty,cPrice,cSubTotal)
{
var nQty = parseFloat(cQty.value);
var nPrice = parseFloat(cPrice.value);
var nSubTotal = nQty * nPrice;
if(isNaN(nSubTotal))
{
cSubTotal.value = "";
return;
}
cSubTotal.value = parseFloat(nSubTotal);
return;
******* End Code ********
However, I know want to pass the cNo (Item number) to the Script and from there, i want the Script to pass the variable to FW and then i will do this if possible in the function:
<%
cItem = [The item number passed from the JS script "cNo"]
sele Acc
set order to No
seek cItem
if eof()
%>
alert('Item was not found');
<%
endif
%>
***********
Could that be accomplished?
I know i can get a FW to JS variable:
var someVar = <%=FWVar%>;