Link to anchor between html scenes

hello everyone, check other threads but I don't see it as it happens to me

In order to optimize, I divided my website into 10 scenes, into individual files, each one created its own html, I'm trying to link from one scene to another scene (html) but in an anchor position.

The action of the button is "go to url" institutional.html#tecnologiasD

reaches the html, but not the anchor

does anyone know what is wrong?

See the first part of this post.

Also


You may actually only need the second post and the code @jonathan offers.

Archive.zip (357.9 KB)

But an example doc of your project setup would help to help you further.

1 Like

first of all .. thank you very much, I managed to bring the html in the anchor position. but now i have another problem.

I am using this script that allows me to change the height of the page in a variable way, since it varies according to the width of the browser

<script>
  function layoutRequest(hypeDocument, element, event) {
    //returns [{name: xxx; height:xxx; width:xxx; breakpoint: xxx}, ...]
    var _layouts = hypeDocument.layoutsForSceneNamed(hypeDocument.currentSceneName());
    //currentLayoutname
    var layoutName = hypeDocument.currentLayoutName();

    //get data for current Layout -> {name: xxx; height:xxx; width:xxx; breakpoint: xxx}
    var res = null;

    for (var i = 0; i < _layouts.length; i++) {
      var Obj = _layouts[i];
      if (Obj.name === layoutName) {
        res = Obj;
        break;
      }
    }


    // set hypeDocumentElement height depending on layoutratio ...
    if (res) {
      var ratioScale = res['width'] / res['height'];
      var hypeEl = document.getElementById(hypeDocument.documentId());
      var currentWidth = hypeEl.offsetWidth;
      var newHeight = currentWidth / ratioScale;
      hypeEl.style.height = newHeight + 'px';


      hypeDocument.relayoutIfNecessary();
    }

    return false

  }

if ("HYPE_eventListeners" in window === false) {
  window.HYPE_eventListeners = Array();
}
window.HYPE_eventListeners.push({
  "type": "HypeLayoutRequest",
  "callback": layoutRequest
});

</script>

but going to page.html#anchor does not load the entire page

I leave you a link where you can see it, in the home you must click on the yellow button +informacion

http://shockmultimedios.com/cabac/