Like already mentioned before → Wix-Hotel does not provide any API to for communication.
Entering the APP itself is also maybe not possible… But tried to figure out how to get access to the right iFrame/custom element on the body of the Wix-Page…
Found some informations about iFrame elements existing on your site…
The following code has been added to your DASHBOARD-CUSTOM-CODE-SETTINGS…
<script>
console.log("Scanning-code by Russian-Dima running....");
setTimeout(function() {
// Initialize an array to store iframe elements
var arrFrames = [];
var obj = {};
// Search for all iframes on the page
var iframes = document.querySelectorAll("iframe");
console.log("Found " + iframes.length + " iframe(s) on the page.");
// Iterate through each iframe and add to arrFrames
iframes.forEach(function(iframe) {
// Create an object to store iframe details
var iframeObj = {};
iframeObj.src = iframe.src;
// Parse the allow attribute of the current iframe
var allowAttrs = iframe.allow.split(';');
// Create an object to store parsed permissions
var allowObj = {};
allowAttrs.forEach(function(attr) {
var trimmedAttr = attr.trim(); // Remove leading/trailing whitespace
allowObj[trimmedAttr] = true; // Set each attribute as a key with value true
});
// Assign the parsed permissions object to iframeObj.iFrameAllowens
iframeObj.iFrame = iframe;
iframeObj.iFrameAllowens = allowObj;
iframeObj.iFrameAllowens.allowFullscreen = iframe.allowFullscreen;
iframeObj.iFrameAllowens.allowPaymentRequest = iframe.allowPaymentRequest;
iframeObj.iFrameAllowens.autofocus = iframe.autofocus;
iframeObj.iFrameAllowens.hidden = iframe.hidden;
iframeObj.iFrameAllowens.draggable = iframe.draggable;
iframeObj.iFrameAllowens.isContentEditable = iframe.isContentEditable;
iframeObj.iFrameAllowens.browsingTopics = iframe.browsingTopics;
iframeObj.ariaLabel = iframe.ariaLabel;
iframeObj.baseURI = iframe.baseURI;
iframeObj.className = iframe.className;
iframeObj.isConnected = iframe.isConnected;
iframeObj.loading = iframe.loading;
iframeObj.localName = iframe.localName;
iframeObj.nodeName = iframe.nodeName;
iframeObj.nodeType = iframe.nodeType;
iframeObj.namespaceURI = iframe.namespaceURI;
// Push iframeObj into arrFrames array
arrFrames.push(iframeObj);
});
// Search for all elements with class 'APP' on the page
var appElements = document.querySelectorAll(".APP");
console.log("Found " + appElements.length + " element(s) with class 'APP' on the page.");
// Log each app element's tag name to the console
appElements.forEach(function(element) {
console.log("Element tag name:", element.tagName);
});
console.log("Element search completed.");
// Now arrFrames contains all iframe elements found on the page
console.log("All iframe elements:", arrFrames);
// Store arrFrames in obj under 'iframes' key
obj.iframes = arrFrames;
console.log("OBJ:", obj);
}, 3000); // Wait for 3000 milliseconds (3 seconds) before executing
</script>
First conclusion → maybe will not work to fix your problem → but will take some more time…
All found iFrames → gets a RED backgroundcolor, once one of them has been found.
As you can see, both found iFames have been marked red, but these 2 elements are the wrong ones.
So we still did not get what we want.
We found…
…and…
And now the → ariaLabel ← makes sense !!!
Since an updated version is now running on your site… → you also can get all the other elements on your site…
As you can see, next to the already mentioned 2-iFrames, much more elements have been found → about 348-elements, which you can now inspect by your own
Adding your own solutions and investigation-tools → will give you more possibilities to investigate, inspect, debug and develop your website.
Wix do not like people to work on DASHBOARD-CUSTOM-CODES, this is why you have just a very very smal (tiny) window to put in your (maybe 1000-lines, or 5000-lines of code) into.
Hey @CODE-NINJA !
I think I found a workaround to solve the issue…
A simple one, really! But looks like it’s working.
Instead of trying to control the Wix Hotel App embedder in the page - I tried out a hunch, and put in an onClick function to the SECTION (#Section2) where the App has been placed in the page -
If it works for you, then let it run like it is.
Do also not forget to deactivate the CUSTOM-CODE, you do not need to run unneccessary codes, increasing the loding times of your website. Your website is already overloaded with a lot of logs and different stuff running in the background (installed trough different predefined stuff).
very useful thank you!
but if I change page and i go back this doesn’t work anymore. Is there a way to make tha started variable GLOBAL (valid on all pages)?
I’ll explain my problem.
i have an entrance animation on my home page but I want it to be played just the first time I visit the website
I’m not fully familiar with the context of this topic, but if you want to play an animation only when a user visits your homepage for the first time, you might be able to handle it by storing a simple log in Wix Storage. By saving a record in the user’s browser, you can determine whether they have visited your homepage before.
Wix Storage is very convenient, but be careful not to store unencrypted information carelessly. It’s best to avoid storing unencrypted personal data. However, simple visit history (e.g., true/false) should be fine.
Additionally, by saving date information, you could introduce variations in behavior based on how long ago the user last visited.