At the same time, I don't understand why you want to call a FoxWeb script through OnClick, instead of simply specifying it in the href attribute. Why not call the script directly? Is it because you are trying to display content from a different page, once the script is done? If yes, you can redirect the user to the other page through the content returned to the browser by the script.
FoxWeb Support Team
Sent by Art Bergquist on 08/31/2019 05:04:47 PM:
|onclick="<%= RecordDocument() %>"
RecordDocument.Prg contains the following code:
|STRTOFILE('Test message', 'RecordDocument.Txt', .F.)
The problem is that when I click on an anchor that has its onclick defined as above, it doesn't appear to run RecordDocument.Prg (since RecordDocument.Txt doesn't get created).
I've also tried not including the equals sign, as follows:
onclick="<% RecordDocument() %>"
but that didn't work (and I don't believe that's the correct syntax anyway).
Has anyone ever tried doing something like this?