I'm moving to a Partial View through a two parameter controller, music and artist. Now in the PV I pass to the function fetchLetra () that is in the file letterIj.js these parameters for the return of the function, however, this is not happening because apparently Partial is not loading any script, it is this way
@model letra.Infra.Models.Letra
@{
var artista = Model.Artista.ToString();
var musica = Model.Musica.ToString();
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script><scripttype="text/javascript" src="@Url.Content("~/js/letraAPI.js")"></script>
<script type="text/javascript">
fetchLetra(artista, musica);
alert("OK");
</script>
Loading the page the HTML looks like this
<div id="letraAPI" class="panel-content">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script><scripttype="text/javascript" src="/js/vagalumeAPI.js"></script>
<script type="text/javascript">
fetchLetra(artista, musica);
alert("OK");
</script>
</div>
Nothing happens, not even the alert is executed.