简体   繁体   English

jquery ui 对话框未显示

[英]jquery ui dialog box not showing


I'm trying to show a jquery dialog box with code like:我正在尝试显示一个 jquery 对话框,其代码如下:

var message = "Request processed successfully";
$('<div>'+message+'</div>').dialog({
   buttons:{
     'Add More':function(){window.location='index.py?mode=Receivable&cm=Add';},
     'View All':function(){window.location='index.py?mode=Receivable&cm=Browse&freshLoad=1';}
   }   
}); 

The text, and buttons (including 'close') all appear and look/work properly, but there is no containing box around them.文本和按钮(包括“关闭”)都出现并且看起来/工作正常,但它们周围没有包含框。 I'm not getting any errors (ie: it can find all the images/scripts/etc. that it's looking for).我没有收到任何错误(即:它可以找到它正在寻找的所有图像/脚本/等)。 I can give more details, but has anyone ran into a similar problem?我可以提供更多细节,但有人遇到过类似的问题吗?

Using your code I was able to get it to work correctly.使用您的代码,我能够使其正常工作。

http://jsfiddle.net/bzGEE/ http://jsfiddle.net/bzGEE/

Check your JS and CSS paths to ensure they aren't 404ing.检查您的 JS 和 CSS 路径以确保它们不是 404ing。

Lack of formatting in jQuery UI is usually due to bad or missing CSS. jQuery UI 中缺少格式通常是由于 CSS 错误或缺失。 Make sure you have the jQuery UI CSS code and images included and the CSS file linked in your page.确保包含 jQuery UI CSS 代码和图像,并在您的页面中链接 CSS 文件。 It should then work correctly.然后它应该可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM