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
随机推荐
- Android ormlite like() function is not working
//http://stackoverflow.com/questions/7642161/android-ormlite-like-function-is-not-working try { Quer ...
- oracle exp/imp命令详解
E:\>exp help=y 通过输入 EXP 命令和用户名/口令,您可以 在用户 / 口令之后的命令: 实例: EXP SCOTT/TIGER 或者,您也可以通过输入跟有各种参数的 EXP 命 ...
- Logcat多tag过滤
当Android设备通过usb连接成功后,在logcat中能看到很多log信息,但太多了很容易将我们关注的日志给淹没掉,所以我们需要过滤.如果接入了不同的SDK,那么log的tag可能会不同,所以有时 ...
- nodejs ffi(DLL)
npm install ffi Error: The specified module could not be found. npm rebuild var ffi = require('ffi') ...
- [Web 前端] 如何构建React+Mobx+Superagent的完整框架
ReactJS并不像angular一样是一个完整的前端框架,严格的说它只是一个UI框架,负责UI页面的展示,如果用通用的框架MVC来说,ReactJs只负责View了,而Angular则是一个完整的前 ...
- 使用idea 在springboot添加本地jar包的方法
原文地址;https://blog.csdn.net/huxiaodong1994/article/details/80702278 1.首先在与src同级的目录下新建一个lib目录,然后将本地jar ...
- window.parent window.top window.parent.location.pathname 没权限
跨域问题啊,如果只是测试的话,放到服务器去测试,本地的(http://localhost/)就算是在同一个文件下,都会被认为跨域的.如果不需要支持低版本IE浏览,可以使用postMessage处理这个 ...
- Swift: Swift中Selector的变化
Swift中Selector变化 2.2 之前,使用字符串作为方法名称 //无参数 btn.addTarget(self, action: Selector("buttonPress&quo ...
- QT 5.12 安装MinGW 7.3.0 32bit
一.下载MinGW 7.3.0 32bit for QT 5.12 链接:https://pan.baidu.com/s/1IKDhvxEbKIgmWyQQhpdnTw提取码:ubxc 二.解压缩并将 ...
- Hadoop streaming 排序、分桶参数设置
编写hadoop任务经常需要用到partition和排序.这里记录一下几个参数. 1. 概念 Partition:分桶过程,用户输出的key经过partition分发到不同的reduce里,因而par ...