javascript - Jquery Dialog box does not appear as soon as it is opened in google chrome and IE -
i trying open verifying permission dialog box shows whether user has permission or not , shows progress icon.
in ie , google chrome, problem dialog box not appear opened, appears when permissions verified. in fire fox works correctly.
here img of dialog box how appears.
here code
var startverifyingpermission = function (serverid) { $("#dialog-message").removeattr("title").attr("title", "verifying permissions"); $("#ui-dialog-title-dialog-message").text("verifying permissions"); var html = ' <table>\ <tr>\ <td>skype business admin</td>\ <td id="isskypeforbusinessadmin">update status ajax</td>\ </tr>\ <tr>\ <td>compliance manager</td>\ <td id="iscompliancemanager">update status ajax</td>\ </tr>\ </table>'; var msg = "<div style='background:white'>" + html + "</div>"; $("#dialog-message").html(msg); $("#dialog-message").dialog({ open: function (event, ui) { $(this).css({ 'max-height': 70, 'overflow-y': 'auto' }); }, modal: true }); var isskypeadmin = checkpermission("isskypeforbusinessadmin", serverid); if (isskypeadmin) { var iscompliancemanager = checkpermission("iscompliancemanager", serverid); } if (iscompliancemanager) { } }; var checkpermission = function (permissionname, serverid) { var tag = '#' + permissionname; var progressimage = '<img src="../images/splashpageloader.gif" height="30px"/>'; var sucessimage = '<img src="../images/mark_tick.ico" height="30px"/>'; var failedimage = '<img src="../images/mark_cross.jpg" height="30px"/>'; $(tag).html(progressimage); var haspermission = false; $.ajax({ type: 'post', url: "myhandlerfile.ashx?cmd=" + permissionname, data: { serverid: serverid }, async: false, success: function (result) { if (result.success) { $(tag).html(sucessimage); haspermission = true; } else { $(tag).html(failedimage); } }, error: function () { $(tag).html(failedimage); } }); return haspermission; }; var registertestpermissionsevent = function () { $(".testpermission").live("click", function() { var serverid = parseint($(this).attr('id')); startverifyingpermission(serverid); }); };
Comments
Post a Comment