I think you should try this, send the script or function.

example.
$("#form_dialog").dialog({ /*some options */})
   .load("url",{}, function(){
     $("head").html("<scr" + "ipt>\n" +
        "function step1() {\n" +
        " setTimeout('step2()', 10);\n" +
        "}\n" +
        "function step2() {\n" +
        "   window.print();\n" +
        "  window.close();\n" +
        "}\n" +
        "</scr" + "ipt>\n") });


Reply via email to