I have a table in HTML where I want a dialog box to appear when a row is clicked. To update my database, I am using an AJAX call like this:
$(document).ready(function() {
$('.myrow').click(function ()
{
$("#dialog").dialog({
autoOpen: false,
modal: true,
width: 600,
height: 300,
resizable: false,
buttons: {
"Yeah!": function() {
$(this).dialog("close");
},
"Sure, Why Not": function() {
$(this).dialog("close");
}
}
});
$.ajax({
type: "post",
url: "shownotification.jsp",
data: {
notifyidd: $(this).attr("id")
},
error : function(){
alert('Error');
},
success: function(msg){
alert('Success');
}
});
});
});
Unfortunately, the dialog box is not appearing. Any help would be appreciated.
In the HTML, I have a division for the dialog box:
<div id="dialog"></div>
I have also included the required JS and CSS files.
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/ui-darkness/jquery-ui.css" rel="stylesheet">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
Despite this, the dialog box is still not showing up. Any suggestions to resolve this issue?