This is my Code, after popup dialog box open need to click the button the function given should work.
$(document).ready(function () {
var box = $('#openbox').dialog({
autoOpen: false,
width: 100,
height: 200,
title: 'hi',
modal: true
});
$('#open-box').click(function () {
getbtn = $('#openbox').dialog({
buttons: {
"view": sayhi()
}
});
getbtn.dialog("open");
});
function sayhi() {
alert("hi..");
}
});
But problem is while opening popup dialog box the function sayhi() is working. not showing any name in button and button click in popup box not working. how to do this?
"view":function(){sayhi();}?