I am curretnly working with some html, css and JS stuff and I am run into a problem. I have absolutly no idea why but I can' t access element in javascript using getElementById or jquery tag.. anything...
Here is html code of my element:
<div id="activeTickets" class="cardmenu_ActiveTickets">
<div id="txt_ActiveTickets" class="Title FontLightGreen">Active tickets:</div>
</div>
here is JS code :
alert($("#txt_ActiveTickets"));
alert(document.getElementById("txt_ActiveTickets"));
if(document.getElementById("txt_ActiveTickets")!= undefined){
document.getElementById('txt_ActiveTickets').innerHTML = Model.GetTranslateText();
}
this is happeing in JS function with name onTranslate()
which is called here :
$( document ).ready(function() {
InitVariables();
ShowForm();
onTranslate();
});
In the function there are ten other divs set with the same code, only with different id, and all other divs works except for this one.. I absolutly have no idea what' s wrong.
I am sorry I can't really tell how exactly the html works with c++. It's project in my work. My colleague is making a c++ part of program and I am making the html,css,javascript stuff. As far as I know it's only connected by html5viewer
object and each html page has it's model
which is set for the every page and in the JS script then to access c++ function you just use Model.function(). That's should be the only connection to html. It only create html5viewer
which displays the pages in html.