Hi, we have been using an external .js file for all text in our html5 output so that the localization team can easily translate the content without having to fuss with the raw Hype file. We have done this by using the element IDs (for example, a text box).
However, I am not sure if this works for the MouseClick action. We’d like to store the url externally in the .js file since localization will change it, depending on the language. I am not sure how to set this up since the element ID for the element we are clicking on is already being used to have the text localized.
When you say give a button a class, what do you mean? (I am very new to the more layered uses of Hype). I searched for class in the help but didn’t see anything. Can you please share more?
in the identity inspector there is a field under the Unique Element ID labelled “Class Name” here you can give any element a space separated list of classes.
red blue spanish iatesomechickenlastnight
The difference is that ID can only be one where classes (Classlist) can contain many.
You would then check against this list and if you find what you’re looking for then you can act upon it.
var myElement = document.getElementByID('someElementWithAListOfClasses');
if (myELement.classList.contains('spanish')){
// do something great! Like change the language.
}
This probably won’t translate into what you’re doing and I wouldn’t use it but you get the idea.