Ništa se ne dešava kada kliknem na link.
Da li može neko da mi pomogne.
evo koda
Code:
<a href="#" onclick="ShowEmployee(@item.IdKompanije)">delete </a>
<a href="#" onclick="ShowEmployee(@item.IdKompanije)">delete </a>
link kojim bi otvorio popup
Modal, standardno
Code:
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<a href="#" class="close" data-dismiss="modal">×</a>
<h3 class="modal-title">Partial View Example</h3>
</div>
<div class="modal-body" id="myModalBodyDiv">
</div>
<div class="modal-footer">
<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>
</div>
</div>
</div>
</div>
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<a href="#" class="close" data-dismiss="modal">×</a>
<h3 class="modal-title">Partial View Example</h3>
</div>
<div class="modal-body" id="myModalBodyDiv">
</div>
<div class="modal-footer">
<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>
</div>
</div>
</div>
</div>
javascript
Code:
<script src="~/Scripts/jquery-3.3.1.min.js"></script>
<script src="~/Scripts/bootstrap.min.js"></script>
<link href="~/Content/themes/base/jquery-ui.css" rel="stylesheet" />
<script src="~/Scripts/jquery-ui-1.12.1.min.js"></script>
<script type="text/javascript">
var ShowEmployee = function (idKompanije) {
var url = "/Kompanijes/ShowEmployee?EmployeeId";
$("#myModalBodyDiv").load(url, function () {
$("#myModal").modal("show");
}
</script>
<script src="~/Scripts/jquery-3.3.1.min.js"></script>
<script src="~/Scripts/bootstrap.min.js"></script>
<link href="~/Content/themes/base/jquery-ui.css" rel="stylesheet" />
<script src="~/Scripts/jquery-ui-1.12.1.min.js"></script>
<script type="text/javascript">
var ShowEmployee = function (idKompanije) {
var url = "/Kompanijes/ShowEmployee?EmployeeId";
$("#myModalBodyDiv").load(url, function () {
$("#myModal").modal("show");
}
</script>
controll
Code:
public ActionResult ShowEmployee(int IdKompanije)
{
return PartialView("delete1");
}
public ActionResult ShowEmployee(int IdKompanije)
{
return PartialView("delete1");
}
Kada otvorim inspect, prijavljuje greške tipa,
ailed to load resource: the server responded with a status of 404 (Not Found)
jquery.min.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
jquery-ui-1.12.1.js:14 Uncaught ReferenceError: jQuery is not defined
at jquery-ui-1.12.1.js:14
at jquery-ui-1.12.1.js:16
jquery-ui-1.12.1.min.js:6 Uncaught ReferenceError: jQuery is not defined
at jquery-ui-1.12.1.min.js:6
at jquery-ui-1.12.1.min.js:6
jquery.min.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
jqueryajax:1 Failed to load resource: the server responded with a status of 404 (Not Found)
(unknown) img
Index:258 Uncaught TypeError: $(...).load is not a function
at ShowEmployee (Index:258)
at HTMLAnchorElement.onclick (Index:150)