How to use mx javascript in Index.html

0
Hi there, I'm struglling with using mx javascript in Index.html. I would like to use "mx.ui.getProfile();". Because I would like to create in javascript whether I can attach /SSO/ to the end of the URL, depending on the value of profile. Does anyone know how to solve this? Thanks in advance!   Edit: I edited comment.(2018/10/9 7:47 UTC)
asked
1 answers
1

From your comment I think that you are on the right track. One thing you need to make sure is that you put your code at the bottom of the page and make sure mx is loaded before calling mx.ui.getProfile

Luckily, mendix has a hook for tis, see - https://apidocs.mendix.com/7/client/mx.html#.addOnLoad

Hope this helps,

answered