PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Receive parameters from javascript
Receive parameters from javascript
Débuté par BARROS, 16 oct. 2019 15:05 - 1 réponse
Membre enregistré
5 messages
Posté le 16 octobre 2019 - 15:05
Hi

I'm new with Windev and I'm, struggling to pass parameters between javascript executed from ExecuteJS command.
I have a HTM Object (windev) that browses a web site where I do a search and collect the result data.
I need to send that information to windev code.
How can I do that?

--
Barros
Message modifié, 16 octobre 2019 - 15:07
Membre enregistré
5 messages
Posté le 16 octobre 2019 - 22:41
Just to share the solution.

sJSCode2 is string = [
Devolve
}
]

HTM_Object.ExecuteJS(sJSCode2,Grava)

INTERNAL PROCEDURE Grava (bSuccess is boolean, ReturnValue is string)
IF NOT bSuccess
Error(ErrorInfo())
RETURN
END

MyArray is array of 5 string
sWK_Result is string
sWK_Result=Replace(ReturnValue,";",CR)

CSVToArray(sWK_Result, MyArray,CR)
//I deleted the rest of the code, because It's not relevant
END

--
Barros