Notifications
Clear all

[Solved] Change html in html block

8 Posts
2 Users
0 Reactions
2,439 Views
(@crisontur)
Posts: 4
Member
Topic starter
 

Hi, i'm trying QuickHMI and doing some tests. I would like to know if is possible to change dinamically an html block, maybe in a javascript function. i've tried with setproperty but doesnt works.there is a solution? Thanks


 
Posted : 19/04/2023 3:14 p.m. CET
Matthias
(@m-folte-9469)
Posts: 34
Member Admin
 

Hello crisontur,

please explain in more detail what you want to achieve and we can probably provide you with an working example.


 
Posted : 20/04/2023 9:45 a.m. CET
(@crisontur)
Posts: 4
Member
Topic starter
 

i can see that the HTML code is static, i can write html code in a html block and then link this block in the html property of an htmlbox.

i see that i can change the html property to have a new link to another html block but i don't need this.

i need, for a basic example, to change the content of the html block during the execution of the software:

so..if i have for example an html block named "TREND" and the content of this block is <iframe src="http://192.168.10.17:8081/f1amb.html?date=06022023&period=day" width="80%" height ="80%"></iframe>

i need to change during execution of the software the content of the html block "TREND" for example changing the date or the period <iframe src=": http://192.168.10.17:8081/f1amb.html?date=13032023&period=month  width="80%" height ="80%"></iframe>

i hope this is more clear now

Thank you for support.... we are looking for a new scada for our applications (our actual scada is too much old style and it seems that the producers don't want to invest on it) and we are testing some other product before starting with a new one.


 
Posted : 21/04/2023 12:14 p.m. CET
Matthias
(@m-folte-9469)
Posts: 34
Member Admin
 

Thank you for expanding on what you want to do.

Please let me know if the attached example is of any help to you. The date and period values can be entered using the textfields. By pressing the button "Set" the iframe will update by calling a javascript function (notice the action on the button). The javascript itself is commented.


 
Posted : 21/04/2023 12:44 p.m. CET
(@crisontur)
Posts: 4
Member
Topic starter
 

Thank you for the fast reply....

but i cannot open your project because i have only, for the moment, a demo license and i receive this error opening the file: "It's not possible to edit a fullversion project with the demo versione of QuickHMI"


 
Posted : 21/04/2023 12:50 p.m. CET
Matthias
(@m-folte-9469)
Posts: 34
Member Admin
 

My mistake, sorry.

Attached a version of the project you should be able to open.


 
Posted : 21/04/2023 1:22 p.m. CET
(@crisontur)
Posts: 4
Member
Topic starter
 

Thank you Matthias..this is just i need!!!!!!


 
Posted : 21/04/2023 2:05 p.m. CET
Matthias
(@m-folte-9469)
Posts: 34
Member Admin
 

You're welcome. Glad I could help you.


 
Posted : 21/04/2023 3:00 p.m. CET