Hello Mark,
>A Sollution could be to edit the database record directly outside the xbrowse (in your Mod program)
That is exactly what I do.
From FIVEWIN
- Code: Select all Expand view RUN
WinExec("CMD /C start chrome --new-window --app=http://localhost/formular/index.prg?recnr=" + ALLTRIM(STR( nkdnr )) )
I start a mod harbour APP and pass the record number with the request.
Then in mod harbour I read the argument from the URL
request: index.prg?recnr=999
- Code: Select all Expand view RUN
//mod harbour
function main
cArgs := AP_Args()
nRecno = VAL( SubStr( cArgs, 7 ) )
In mod harbour I open the customer.dbf and go to record number.
- Code: Select all Expand view RUN
use ( cdbf_file ) new ALIAS TMPDBF_FILE
goto nRecno
then I fill a HASH and pass the HASH to the HTML part of the web page
- Code: Select all Expand view RUN
TEMPLATE PARAMS hTmp
In the HTML <form> I asign the HASH to a javascript object - this is very similar to harbour HASH.
- Code: Select all Expand view RUN
<script>
var object=<?prg return hb_jsonEncode( hTmp, .T. )?>;
document.getElementById("first").value = object[ "FIRST" ];
> A refresh of the xbrowse when comming back from Mod.
How can you notify xBrowse that you are "comming back" now.
Maybe a timer is a good solution. In practice, it is the same if you are working in a multiuser environment.
Best regards,
Otto