zoukankan      html  css  js  c++  java
  • 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)',
             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");
        });
    
    }
    
  • 相关阅读:
    win7 计划任务
    计算机英语翻译
    开机自启动win7计划任务
    vc++ 创建异性窗体(1)
    C++ TaskScheduler msdn杂志
    vc++创建异性窗体(2)
    Task Scheduler 参看——有关闭电源设置和添加目录设置参考
    CComPtr用法
    Builtin\administrators 与 Domain Admins 用户组的来历与区别
    CreatDC()和CreateIC()
  • 原文地址:https://www.cnblogs.com/wancy86/p/modal_window.html
Copyright © 2011-2022 走看看