i'm trying to use dmuy / MDTimePicker github project i add in my menu head some script, such as
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="script/mdtimepicker.js"></script>
and in my page
<li onclick="InserisciOrario('risultato','Inserimento Orario OneClick');"><a href="#"><i class="fas fa-clock"></i>Inserisci Orario Trasferta</a></li>
to call a jquery function "to go" to my webmethod that return string in a div to show clock
function InserisciOrario(div, tipo) {
//var target = document.getElementById(div);
////var spinner = new Spinner(opts).spin(target);
$(div).html("");
$.post({
url: 'menu.aspx/CreaOrarioGiornaliero',
type: 'POST',
data: '{Tipo: "' + tipo + '" }',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data, textStatus, jQxhr) {
document.getElementById(div).innerHTML = "";
document.getElementById(div).innerHTML = data.d;
//spinner.stop();
},
error: function (jqXhr, textStatus, errorThrown) {
console.log(errorThrown);
}
});
}
webmethod in vb.net return a string in my div page
Html += "<tr><td colspan='4' style='text-align: center;'><div>Seleziona Inizio: <input type='text' id='InizioTrasferta'/></div><script>$(document).ready(function () {$('#InizioTrasferta').mdtimepicker();});</script>"
but nothing's shown.
If i put it in a standard html page it works.
I hope to explain my problem well Any help may be appreciated.
Thanks Regards
SOLVED
I put this function in app.js
function apritime() {
$('#InizioTrasferta').mdtimepicker();
$('#InizioTrasferta').show;
}
and call it from method by onclick method
onclick=" + Chr(34) + "apritime();" + Chr(34) + "
thanks anyway
bye