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.
Hanlon’s razor is an eponymous adage named after Robert J. Hanlon that states: “Never attribute to malice that which is adequately explained by stupidity.â€
JamesD
Edited 1 time(s). Last edit at 01/24/2012 03:04AM by JamesD.