I'm loading some html and JS into the WebGadget. The JS now changes the HTML content of a textarea. But the function GetGadgetItemText() returns the original code and not the one changed by using JS. Or did I do it wrong?
Code: Select all
If OpenWindow(0, 0, 0, 800, 600, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(0, 10, 10, 780, 580, "")
html.s = "<html><body>"+
"<textarea id='editor'></textarea><br>"+
"<input type='button' value='test' onclick=" + Chr(34) +
"document.getElementById('editor').value='something';" + Chr(34) + ">"+
"</body></html>"
SetGadgetItemText(0, #PB_Web_HtmlCode, html.s)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
newhtml.s = GetGadgetItemText(0, #PB_Web_HtmlCode)
Debug html.s
EndIfQuestion in another direction: How do I get the changed content out of the WebGadget without using API?
Kukulkan

