All,
I've been using the following code for years to access a website for credit card processing. This function displays a window and allows the user to enter credit card information to process a credit card and then returns the result. Now, all of a sudden when this function is called, I get "An error has occurred in the script on this page", Error: syntax error.
I suspect this has something to do with Microsoft updating Edge and ending support for ActiveX. I tried changing the settings in Edge to allow for Internet Explorer Mode with no luck.
Has anyone else seen this problem? What can I use besides ActiveX to get around this issue?
Here is my code.
FUNCTION HPCall( cTransactionSetupID, oDlg )
local oWndHP, oActiveX
local cEvents := ""
LOCAL cHtml := ""
LOCAL oIcon
DEFINE ICON oIcon RESOURCE "MYICON"
DEFINE WINDOW oWndHP ;
FROM 1, 5 TO 40, 75 ;
TITLE "Hosted Payments" ;
STYLE nOr(WS_CAPTION, WS_SYSMENU)
oActiveX = TActiveX():New( oWndHP, "Shell.Explorer.2" )
oWndHP:oClient = oActiveX // To fill the entire window surface
oActiveX:Do( "Navigate", HOSTEDPAYMENTS + "/?TransactionSetupID="+ cTransactionSetupID )
ACTIVATE WINDOW oWndHP ;
ON INIT ( oWndHP:SetIcon( oIcon ) ) ;
VALID ( cHtml := HPCallResults(oActiveX), .t. )
// Disable my app until this window is closed!
IF !empty(oDlg)
oDlg:disable()
ELSE
oWnd:disable()
ENDIF
DO WHILE empty(cHtml)
SysRefresh()
ENDDO
IF !empty(oDlg)
oDlg:enable()
oDlg:SetFocus()
ELSE
oWnd:enable()
oWnd:SetFocus()
ENDIF
RETURN cHtml
Thanks,
Randal