User1922541779 posted
I need the simplest bare bone example of ajax in mvc app. I created mvc 5 app to experiment but I cannot make it work. I tried AJAX first and it turned out to create a nightmare. So I tried to run this simple alert from Javascript. I am getting warning
:
Index:1 The connection used to load resources from https://localhost:44309 used TLS 1.0 or TLS 1.1, which are deprecated and will be disabled in the future. Once disabled, users will be prevented from loading these resources. The server should enable TLS
1.2 or later. See https://www.chromestatus.com/feature/5654791610957824 for more information.
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<a href="#" data-movieId="34" class="movie">Delete Avengers</a>
<a href="#" data-movieId="35" class="movie">Delete Iron Man</a>
<script type="text/javascript">
(function () {
let p = document.getElementsByClassName("movie");
p.click(function(e){
alert("hi");
});
});