自定义内容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. go 删除数组元素

    golang中对一个slice进行“slice”可以取片段得到一个新的slice,那么如何用简洁的代码删除slice中的一个元素呢? a := []int{0, 1, 2, 3, 4} //删除第i个 ...

  2. centos7编译安装nginx及无缝升级https

    安装依赖: yum install -y gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel 下载nginx: wget -c  ...

  3. crm操作产品实体

    using System;     using Microsoft.Xrm.Sdk;     using Microsoft.Crm.Sdk.Messages; /// <summary> ...

  4. 调用人人网API

    大致步骤与上篇调用新浪微博API类似.只是感觉新浪微博的做的更好一些,人人网的非常多要手动操作 与新浪微博类似,先在人人网开放平台http://dev.renren.com/注冊站内应用, 把该填的填 ...

  5. Hyperledger 项目

    https://github.com/hyperledger/fabric.githttps://github.com/hyperledger/blockchain-explorer.githttps ...

  6. 同一个ImageView根据xml文件来显示不同的图片--level-list

    感谢:http://blog.sina.com.cn/s/blog_6111ce890100psq9.html 有时候,我们为了在一个ImageView中显示不同的图片,平时往往会使用: if (条件 ...

  7. 《Google Glass开发指南》

    <Google Glass开发指南> 基本信息 作者: BestApp工作室 丛书名: 图灵原创 出版社:人民邮电出版社 ISBN:9787115349477 上架时间:2014-3-19 ...

  8. error “Device supports x86, but APK only supports armeabi-v7a”

    checkout the build.gradle from module:app. It turns out that there's a such config: ndk { abiFilters ...

  9. 字符串中单词的逆转,即将单词出现的顺序进行逆转。如将“Today is Friday!”逆转为“Friday! is Today”.

    字符串中单词的逆转,即将单词出现的顺序进行逆转.如将“Today is Friday!”逆转为“Friday! is Today”. #include<iostream> #include ...

  10. ASP.NET Core 中间件 中间件(Middleware)和过滤器(Filter)的区别

    https://www.cnblogs.com/savorboard/p/5586229.html 前言 在上篇文章主要介绍了DotNetCore项目状况,本篇文章是我们在开发自己的项目中实际使用的, ...