SOLVED - Using $_Value=injectJS() to return system date.
I am trying to get the system datetime stamp returned into a macro language variable. I have tried many variations of code, but none has worked so far. Something like the following should work, but I am not an expert in Javascript and it is probably missing some key part.
$_Snippet_Value = injectJS( var d = new Date(dateString););
alert( $_Snippet_Value, "datestring", INFO);
I know the MacroLanguage is correct because Siria was able to get a sorting program to work.
Siria's code
$_puzzle=injectJS("var puzzle=navigator.MacroVarPuzzle.substr(127,9999); navigator.MacroVarPuzzle=puzzle; function returnVar(v){return v;} returnVar(puzzle);");
I am sure that that all or part of the returnVar(), etc code is needed, but I have tried many times and I have not gotten it right yet.
Any help will be appreciated.
K-Meleon 1.6.0 beta 2.4 Win 7 (32 bit)
Edited 1 time(s). Last edit at 01/24/2012 10:04AM by JamesD.