I'm using homeLYnk (2.0.1) in a camper, so it's mobile.
I have already the actual position (latitude and longitude) in two different KNX objects.
Now I want to show the actual position in a frame with an URL like this: http://osmand.net/go.html?lat=37.47498&l...46356&z=15.
But, of course, this URL is static so the position will never change.
How can i manipulate the frames url by script to see always my actual position?
Create a frame and give it the additional class "position" and create 3 objects where your LON, LAT and ZOOM variables are written to and create this custom JS:
This will update the URL in the frame as soon as one of the 3 object values are changing, it happens client side so no refresh of the client is needed.
Thanks for the very quick response. It seems that sundays are disabled in the netherlands ?
I'll follow your instructions and give you a short feedback.
your instructions are working perfect! Thank's again.
On more question: when my camper don't move and I open this page the old URL is valid again and the frame shows an old position and not the actual one.
Is there a method to store a new URL permanent in this frame?
or
is it possible to set an automatic trigger on the KNX objects (lat, lon or zoom) by opening this page?
or
I added this code, but unfortunately the behaviour doesn't change. Without changing the object values (in lon, lat or zoom) the frame shows an old position on opening the page with this frame in it.
When I open the page in edit mode the frames source URL is also the old one instead of the actual one.
It seems that the code changes the src (URL) only temporary.
Did you manage to update your url from this script?
Indeed I am trying to display a URL contained in a string type object and I cannot update the FRAME from this JS.
here is my script:
<div class="item testurl item-iframe" style="top: -1px; left: -1px; z-index: 10; width: 1025px; height: 769px;"><iframe border="0" frameborder="0" width="1025" height="769" src="https://xxxxxx"></iframe></div>
This is what I get when I inspect the iframe