stingray中modal window
自定义内容modal window
//show window for D&B suggestions
function showDBMatch(resp) {
console.log('xxx: ', resp);
html = '';
for (var i = 0; i < resp.length - 1; i++) {
html += '<div class="match" style="" title="Please click to select this match.">'
html += ' <span>' + resp[i].DUNS + '</span>'
html += ' <br>'
html += ' <span>' + resp[i].BusinessName + '</span>'
html += ' <br>'
html += ' <span>' + resp[i].YearStarted + '</span>'
html += ' <br>'
html += ' <span>' + resp[i].SIC + ': ' + resp[i].SIC_Desc + '</span>'
html += ' <br>'
html += '</div>'
}
html += '<div style="clear:both"></div>'
html += '<div style="margin-top: 20px; text-align: left; margin-left: 10px;">'
html += ' <button id="DBNoMatchBtn">None of these match</button>'
html += '</div>'
var $dialogW = $("<div id='DBBox' style=''></div>").html(html).dialog({
title: 'Business Match(es)',
width: 660,
height: 300,
modal: true,
autoOpen: false,
close: function(ev, ui) {
$(this).dialog("destroy");
},
// buttons: {
// Cancel: function() {
// $(this).dialog("destroy");
// return false;
// }
// }
});
$dialogW.dialog("open");
// bind btn click
$('#DBNoMatchBtn').die().live('click',function(){
$dialogW.dialog("destroy");
});
//bind match select
$('#DBBox .match').die().live('click', function(){
console.log('match: ',$(this).html());
$('#PQ_DUNS_No').val($(this).find('span').eq(0).text())
$('#PQ_MemberName').val($(this).find('span').eq(1).text())
$('#PQ_YrBizStart').val($(this).find('span').eq(2).text())
$('#PQ_BusinessIndustry').val($(this).find('span').eq(3).text())
$dialogW.dialog("destroy");
});
}
stingray中modal window的更多相关文章
- jquery中的$(document).ready()、JavaScript中的window.onload()以及body中的onload()的区别
body中的onload()和window.onload以及$(document).ready()的区别: 1.前两者都表示当页面加载元素(包括图片等信息)完毕后执行的操作,而且两者在各种浏览器中 ...
- JavaScript中,window.opener是什么?window.parent和window.opener有啥区别?
来自CSDN的问答: window.opener是什么啊? ++++++++++++++++++++++++++++++++++++++++++++++++++ 弹出本窗体的句柄 比如你想点一个按钮直 ...
- Jquery中$(document).ready()与传统JavaScript中的window.onload方法的区别(2016/8/3)
Jquery中$(document).ready()的作用类似于传统JavaScript中的window.onload方法,不过与window.onload方法还是有区别的. 1.执行时间 ...
- 遇到问题-----JS中设置window.location.href跳转无效(在a标签里或这form表单里)
问题情况 JS中设置window.location.href跳转无效 代码如下: ? 1 2 3 4 5 6 7 8 <script type="text/javascript&quo ...
- 细说javascript 中的 window.open() 参数设置
今天遇到一个问题,就是要用javascript中的window.open()打开一个新的网页,而且新打开的网页要在原来网页的基础之上,在查了一些资料之后,找到里一下方法:(其中,url 为链接的地址) ...
- jQuery 1.4.4 中 function( window, undefined ) 写法原因
读 jQuery 1.4.4 版本代码的时候,发现下面的写法: (function( window, undefined ) { ... // code goes here })(window); w ...
- (转载)JavaScript中的Window窗口对象
(转载)http://www.ijavascript.cn/jiaocheng/javascript-window-65.html 例子: <html> <head> < ...
- 关于 jQuery中 function( window, undefined ) 写法的原因
今天在读 jQuery 源码的时候,发现下面的写法: (function(window,undefined){ ...// code goes here })(window); window 作为参数 ...
- JavaScript中的window对象
JavaScript中的window对象:http://www.cnblogs.com/kissdodog/archive/2013/01/01/2841464.html
随机推荐
- 【linux】linux命令grep + awk 详解
linux命令grep + awk 详解 grep:https://www.cnblogs.com/flyor/p/6411140.html awk:https://www.cnblogs.com ...
- Quartz 2.3.0 升级感受
Quartz 2.3.0 发布,Quartz是一个开源的作业调度框架,它完全由Java写成,并设计用于J2SE和J2EE应用中.它提供了巨大的灵 活性而不牺牲简单性.你能够用它来为执行一个作业而创建简 ...
- 用UIBezierPath数组对UIView进行镂空处理
用UIBezierPath数组对UIView进行镂空处理 效果 源码 // // CutOutClearView.h // CutOutMaskView // // Created by YouXia ...
- tomcat站点配置
那么只需要在tomcat 上下文中声明 <Parameter name=“log4j.org.springframework.orm” value=“debug”/> 1.server.x ...
- 开源项目PullToRefresh详解(三)——PullToRefreshScrollView
和前几篇文章一样,这里还是先设置布局文件,然后找到这个控件.只不过这里要简单很多. 1.布局文件 <?xml version="1.0" encoding="utf ...
- [Android Pro] 由模块化到组件化(一)
cp from : https://blog.csdn.net/dd864140130/article/details/53645290 在Android SDK一文中,我们谈到模块化和组件化,现在我 ...
- SVG 使用marker画箭头(一)
一.使用Marker画箭头 1.定义一个箭头的marker引用 <defs> <marker id='markerArrow' markerWidth='13' markerHeig ...
- 使用Bootstrap后,关于IE与Chrome显示字体的问题
在做日志系统时,使用了Bootstrap,然后通过浏览器查看的页面效果如下 对比可以看到,同样的字体,IE显示的圆润些,而Chrome字体则丑很多.因为Chrome默认用宋体 在http://v3.b ...
- nodejs中thiskeyword的问题
再分析详细内容之前,必需要好好阅读下面下面两篇blog 学习Javascript闭包(closure) Javascript的this使用方法 这两篇文章是阮一峰老师对Javascript的闭包和th ...
- XML和JSON优缺点
<1>.XML的优点 A.格式统一,符合标准: B.容易与其他系统进行远程交互,数据共享比较方便.<2>.XML的缺点 A.XML文件庞大,文件格式复杂,传输占带宽: B.服务 ...