自定义内容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的更多相关文章

  1. jquery中的$(document).ready()、JavaScript中的window.onload()以及body中的onload()的区别

      body中的onload()和window.onload以及$(document).ready()的区别: 1.前两者都表示当页面加载元素(包括图片等信息)完毕后执行的操作,而且两者在各种浏览器中 ...

  2. JavaScript中,window.opener是什么?window.parent和window.opener有啥区别?

    来自CSDN的问答: window.opener是什么啊? ++++++++++++++++++++++++++++++++++++++++++++++++++ 弹出本窗体的句柄 比如你想点一个按钮直 ...

  3. Jquery中$(document).ready()与传统JavaScript中的window.onload方法的区别(2016/8/3)

    Jquery中$(document).ready()的作用类似于传统JavaScript中的window.onload方法,不过与window.onload方法还是有区别的. 1.执行时间       ...

  4. 遇到问题-----JS中设置window.location.href跳转无效(在a标签里或这form表单里)

    问题情况 JS中设置window.location.href跳转无效 代码如下: ? 1 2 3 4 5 6 7 8 <script type="text/javascript&quo ...

  5. 细说javascript 中的 window.open() 参数设置

    今天遇到一个问题,就是要用javascript中的window.open()打开一个新的网页,而且新打开的网页要在原来网页的基础之上,在查了一些资料之后,找到里一下方法:(其中,url 为链接的地址) ...

  6. jQuery 1.4.4 中 function( window, undefined ) 写法原因

    读 jQuery 1.4.4 版本代码的时候,发现下面的写法: (function( window, undefined ) { ... // code goes here })(window); w ...

  7. (转载)JavaScript中的Window窗口对象

    (转载)http://www.ijavascript.cn/jiaocheng/javascript-window-65.html 例子: <html> <head> < ...

  8. 关于 jQuery中 function( window, undefined ) 写法的原因

    今天在读 jQuery 源码的时候,发现下面的写法: (function(window,undefined){ ...// code goes here })(window); window 作为参数 ...

  9. JavaScript中的window对象

    JavaScript中的window对象:http://www.cnblogs.com/kissdodog/archive/2013/01/01/2841464.html

随机推荐

  1. Unity 动画知识之一

    Unity现在已经用的很广泛啦,可是却一直没有什么美术向的教程. 程序用方面的内容在各个论坛都有讨论,但是美术似乎很弱势啊. 明明美术也很需要掌握引擎方面的内容嘛! 山谷里的野百合还有春天呢 我们美术 ...

  2. WinForm IME输入法BUG完美修复

    本文来自http://hi.baidu.com/wingingbob/item/a2cb3fc0fe3bd1bb0d0a7b5b <WinForm IME输入法BUG测试>里,我描述了在. ...

  3. [Android Security] APK自我保护 - DEX/APK校验

    cp : https://segmentfault.com/a/1190000005105973 DEX校验 classes.dex 是 Android 虚拟机的可执行文件,我们所写的 java 代码 ...

  4. information_schema系列十

    information_schema系列十   1:INNODB_FT_CONFIG 这张表存的是全文索引的信息,查询前可以先通过以下语句查询一下开启全文索引的表: show variables li ...

  5. Java| 编译和反编译

    原文链接: http://www.yveshe.com/articles/2018/05/01/1525172129089.html 什么是编程语言? 在介绍编译和反编译之前,我们先来简单介绍下编程语 ...

  6. Python生成文件列表

    https://blog.csdn.net/ZWX2445205419/article/details/73527857 改进 # coding=utf-8 import os def makeFil ...

  7. Chart/Report资源目录

    ylbtech-Chart:Chart/Report资源目录 1.Chart.js返回顶部 1-0.官网 http://www.chartjs.org 1-1.实例 http://www.chartj ...

  8. Poly2Tri介绍[转]

    https://blog.csdn.net/xys206006/article/details/83002326 这是Poly2Tri介绍的翻译博文.原文链接:http://sites-final.u ...

  9. VS2010新建Web网站与新建Web应用程序的区别 (转)

    在Visual Studio 2010中,除了可以使用“创建Web应用程序”的方式来构建自己的Web项目之外,还可以通过创建“Web网站”的方式来构建Web项其中,Web网站的创建方法:打开Visua ...

  10. [leetcode]Unique Binary Search Trees II @ Python

    原题地址:https://oj.leetcode.com/problems/unique-binary-search-trees-ii/ 题意:接上一题,这题要求返回的是所有符合条件的二叉查找树,而上 ...