I am using a jquery dialog, and what i want to implement is when user press \"ok“, the progamming keep going, when press \"cancel\", it stoped.
function dis
function displaymessage() { $("#confirm").dialog({ autoOpen:false, buttons:{ "OK":function(){ test(1); $(this).dialog("close"); }, "Cancel":function(){ test(0); $(this).dialog("close");} } }); } function test(bool) { if(bool==1) return true; else return false; }