Я хотел бы заполнить jqmodal данными, поступающими из поста jquery () - PullRequest
0 голосов
/ 29 сентября 2011

У меня есть этот код, который работает:

jQuery("#Zone__" + row + "__documents").find("td:eq(3)").mouseover(function(){
var text = jQuery("#Zone__" + row + "__documents").find("td:eq(3)").html();
if(text.indexOf("...") > 0){
    jQuery.post("/_common/cfc/act_get.cfc?method=getNcas&returnFormat=json",
        {document_id:doc_id,maxnum:100},
        function(res,code){
            alert(res);
        },
        "json"
    );
     }
});

Теперь вместо предупреждения я хотел бы открыть плагин jquery 'jqmodal' с данными, поступающими из поста внутри него (res). Может ли кто-нибудь помочь мне добиться этого?

Заранее спасибо, Michel

1 Ответ

0 голосов
/ 29 сентября 2011

Не знаком с этим плагином, но, прочитав документацию, я ожидал, что это сработает (при условии, что вы включили необходимые ресурсы .js / .css:

<div class="jqmWindow" id="dialog"></div>

$(document).ready(function() {
    $('#dialog').jqm();

    jQuery("#Zone__" + row + "__documents").find("td:eq(3)").mouseover(function(){
    var text = jQuery("#Zone__" + row + "__documents").find("td:eq(3)").html();
    if(text.indexOf("...") > 0){
        jQuery.post("/_common/cfc/act_get.cfc?method=getNcas&returnFormat=json",
            {document_id:doc_id,maxnum:100},
            function(res,code){
                $('#dialog').html(res);
                $('#dialog').jqmShow();
            },
            "json");
         }
    });  
});
...