Problem: I gave up on trying to send data from Saola to google sheets. So now i am going to try to use php and Mysql. Until i get there…i am learning/experimenting with php etc (I have a saola project in an i frame).
I read Access Saola Animate from outside - Saola Animate / Support Questions - ATOMI Community (atomisystems.com)
I think i was able to get the global Saola Object, but now i can’t get the value of a text box in Saola Project. I was able to do it in the Saola project (using a button on the Canvas), but now i can’t read it on the php page (where i have the iframe).
> button onclick="loadIFr()">Try it</button // i removed start and end signs
button onclick="getInf()">Get Info</button //i removed start and end signs <script> function loadIFr() { var ifrm = document.createElement("IFRAME"); ifrm.setAttribute("src", "......Salo/index.html"); //removed full link here only ifrm.setAttribute('id', 'sal'); ifrm.width = "800"; ifrm.height ="500" document.body.appendChild(ifrm); } function getInf() { var x = document.getElementById("sal"); var elmnt = x.contentWindow.AtomiSaola.topDocs[0]; //console.log(elmnt) this show many properties etc. so i think i did that right //var data = elmnt.doc.getElement("tb_v").value; // does not work Uncaught Type error var data = elmnt.document.getElementById("tb_v").value; // same problem alert(data); } </script>
I have tried more variations with no luck (i commented a few in the code above)
In the help article i referenced above…it says
- After getting the Saola Animate document, please use its public APIs to control it. For example,
theDocument.pause(), theDocument.play()
to pause, resume animations in the main timeline.
Should “doc.getElement(“tb_v”).value” not work??. Is it not the same as theDocument.play(). Or am I confusing “theDocument”??
Saola Animate version: 3
OS: win 10
Notes: Some of the code I pasted here does not show up properly. Is there something i should be doing to avoid that???