DavidSmith-1b8d
7 months agoCommunity Member
Show an image or object with javascript
Hello!
I currently have a trigger that runs a javascript function that I am bringing over from HTML.
At the end of the function (shown below), I am trying to show a workspace/object. I'm not as familiar with pure javascript, is there a good way to show something in a DIV? Is there some other way to call the DIV to get it to show up?
<script>
(function(d, s, id){
SE_BASE = "38071bda.containers.sphere-engine.com";
SE_HTTPS = true;
SE = window.SE || (window.SE = []);
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = (SE_HTTPS ? "https" : "http") + "://" + SE_BASE + "/static/sdk/sdk.min.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "sphere-engine-jssdk"));
SE.ready = function(f){if (document.readyState != "loading" && document.readyState != "interactive") f();else window.addEventListener("load", f);};
</script>
<div data-id="example-workspace" data-workspace="d66e075f45e44d2b9c02112f7e824e6b"></div>
<script>
SE.ready(function() {
var workspace = SE.workspace("example-workspace");
});
</script>