Passing a variable to javescript
Posted: Sun Nov 03, 2019 11:21 am
Dear Antonio,
passing a variable to javescript I use:
<s cript>
var cTimeDate = <?prg f_timeDate() ?>
</s cript>
function f_timeDate()
local cDatum_Zeit := ""
cDatum_Zeit := "'" + dtoC(date()) + " " + time() + "'"
? cDatum_Zeit
return cDatum_Zeit
//----------------------------------------------------------------//
I seems to me that function is read 2 times. Is this the correct way to get variables from Harbour to JS.
Best regards
Otto
passing a variable to javescript I use:
<s cript>
var cTimeDate = <?prg f_timeDate() ?>
</s cript>
function f_timeDate()
local cDatum_Zeit := ""
cDatum_Zeit := "'" + dtoC(date()) + " " + time() + "'"
? cDatum_Zeit
return cDatum_Zeit
//----------------------------------------------------------------//
I seems to me that function is read 2 times. Is this the correct way to get variables from Harbour to JS.
Best regards
Otto