I have this function connected to the click of a button, but it gives me this problem, how could I solve it?
function ClickHelp() {
if ($("#text_help").html()=="" || $("#text_help").html().indexOf("non presente per il")>0){
if ($("#frameapplication").length>0)
var titolo2=document.getElementById("frameapplication").contentWindow.location.href.replace(".html","").split("/");
var url = '';
var nomecompleto = '';
if (titolo2.length > 0) url = titolo2[titolo2.length - 1];
nomecompleto = "/htdocs/" + url.replace(/\.[^/.]+$/, "") + "_help.html";
$("#text_help").load(nomecompleto);
}
}
<div class="help-container" id="help-container" onclick="ClickHelp()">
<button class="menu" id="sized" onclick="document.getElementById('help').style.display='block'">
<i class="fa fa-question"></i></button>
</div>
<div class="modal" id="help">
<div class="modal-content_menu animated fadeInRight">
<div class="w3-container">
<div class="modal-header_menu">
<span class="close"onclick="document.getElementById('help').style.display='none'">×</span>
<div id="text_help" class="modal-body_menu"></div>
</div>
</div>
</div>
</div>