[Gambas-user] Getting innerHTML of a WebControl

Safiur Rahman isafiur at gmail.com
Sat Sep 25 09:50:33 CEST 2021


Hi Benoît

WebControl.ToHTML() is supposed to return string content of the
WebControl. But it doesnot return any value if WebControl gets content
through js eg. gw.setInnerHtml() method

For example:

 Public Sub WebButton2_Click()

  Me.Exec("gw.setInnerHtml(" & JS(WebHtml1.Name) & ",'abcdef')")

End

>> WebHtml1 displays "abcdef"

Public Sub WebButton1_Click()

  Message.Info(WebHtml1.ToHTML())

End

>> The message has nothing

Attached a project

-- 
Regards
Safiur Rahman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: controldata.tar.xz
Type: application/x-xz
Size: 12480 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210925/6c53ef16/attachment-0001.xz>


More information about the User mailing list