PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV Mobile 2024 → Javascript security settings for Android HTML control
Javascript security settings for Android HTML control
Iniciado por Stewart MICHAEL, 20,sep. 2016 12:47 - No hay respuesta
Publicado el 20,septiembre 2016 - 12:47
IF HTTPRequest(sQuery)=True THEN
// Retrieves the result of the query
//if HTTPSendForm("Auth1",surl,httpGet)=true then

bufResHTTP is Buffer = HTTPGetResult(httpResult)
// HTM_microsoft_response..Value = bufResHTTP

// IF IniOSMode() = True OR IniOSSimulatorMode() = True OR IniOSEmulatorMode() = True THEN
IF StringCount(bufResHTTP, “ISO-8859-1, IgnoreCase) = 0 THEN
gsHTTPResult = UTF8ToString(bufResHTTP)
ELSE
gsHTTPResult = AnsiToUnicode(bufResHTTP)
END
// ELSE IF InAndroidMode() = True OR InAndroidSimulatorMode() = True OR InAndroidEmulatorMode() = True
// // result in Android
// gsHTTPResult = UTF8ToString(bufResHTTP)
HTM_microsoft_response..SecurityHtml = False
Info(gsHTTPResult)

// END
HTM_microsoft_response = gsHTTPResult

ELSE
HTTPError is string = (HTTPGetResult(httpHeader))
Error(HTTPError)
END


The code above works for IOS but not for Android (the HTTPRequest is for a OneDrive login). The actual HTM control is blank on an android phone but the info request shows HTML code saying that the javascript is not enabled. The checkbox is selected though to allow scripts to be run as well as the "HTM_microsoft_response..SecurityHtml = False" line

I have left the commented lines to show some of the options I have tried but to be honest I could have filled a few pages with that (just loading the string straight to the HTML gives me a set of Chinese characters for example).

Thanks for any help that can be suggested.