Hi! l need help exporting data from 'GetElementData' using executeBrowserJavascript
Here is a snippet from the code:
Client:
local browser = guiGetBrowser(guiCreateBrowser(0, 0, 1920, 1080, true, true, true))
addEventHandler("onClientBrowserCreated", browser,
function ()
loadBrowserURL(source, "http://mta/account/Characters/MainMenuChar.html")
showCursor(true)
setDevelopmentMode(true, true)
end)
addEventHandler("onClientBrowserDocumentReady", browser,
function ()
executeBrowserJavascript(source,
"document.getElementById('nickname').innerHTML = '" .. getElementData(thePed,"account:charselect:name") .. "'");
end)
it does not work with CEF(HTML) files, when you call 'GetElementData' using the GUI, everything works and is displayed correctly.
When entering a standart varible, for example getPlayerName(localplayer) everything is also displayed in CEF and in the GUI
Problems with the HTML file are excluded, except that there are no additional scripts using JavaScript (tell me, are they required?)
P.S Thank you in advance for each of your answers, maybe they will help not only me, but also other newcomers in our community