how to set an option using a callback?
How can I set an option using a callback? I want to dynamically add some buttons to my dialog and set the height, but jquery seems to completely ignore my function(). How is this done correctly?
<span id='dialog1'>Bewerken</span>
<script type='text/javascript'>
$(document).ready(function() {
$('#dialog1').click(function() {
$('<div></div>')
.attr('title', 'Monster')
.dialog({'buttons': function() { return {'Ok': function() { alert('hoi'); } } },'height': function() { return $(window).innerHeight(); },'modal': '1','width': '800'})
.dialog('open')
.css({'text-align': 'center'})
.append( $('<img />').attr('src', '/images/loading.gif') )
.load('http://sitwst05-panta/worksheet/resultaten_invoeren.php?worksheet_id=416&monster_id=4536&single=1')
;
return false;
});
});
</script>