Monday, August 6, 2012

how to open modal popup for email in jquery

We have an option to get the Dialog box in juqery.But In this post i will given an example for how to open a model popup with custom height , width and also email data on click event .I have given focus to user name when popup in opened.
 jQuery('.email_icon').click(function () {
        openModalpopupEmail();
    });
    var openModalpopupEmail = function () {
        $.get("newemail.html", function (maildata) {
            modalWindow.windowId = "TestModal";
            modalWindow.width = 452;
            modalWindow.height = 450;
            var strres = "<div class='FBox'>";
            strres += maildata; strres += "</div>";
            modalWindow.content = strres;
            modalWindow.open();
            $("#s_name").focus(); 
        });
    };

No comments:

Bel