B4J Question How to change iframe's html with websocket ?

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi
I have build a no-ui server. the front side page connect this server with b4j_ws.connect. the front side page has a iframe. I try to change iframe's html from server in the runtime.
How can i do it ? o_O
 

jinyistudio

Well-Known Member
Licensed User
Longtime User
It is OK
main = iframe name
B4X:
<iframe name="main" src="" width="100%" height="90%" scrolling="no" frameborder="0"></iframe>
s1 = new url
B4X:
ws.Eval($"window.frames["main"].location.href= '${s1}';"$,Null)
ws.Flush
 
Upvote 0
Top