完整日历+jquery ui对话


full calendar + jquery ui dialogue

我使用的是完整日历:-http://arshaw.com/fullcalendar/

我正在使用jquery.post将一个参数返回到同一页面以生成一些结果,这很好。

同时,我希望使用jquery ui对话框来保存显示的内容。当粘贴来自官方网站的示例代码时,该示例起作用。然而,在将.post输出与对话相结合时,它并不成功。

我想寻求帮助组合以下两组脚本:-

//用于生成后期输出(工作!)

<script>
function event_details(thevalue){
$.post('module/calendar/event_details.php',{
eid:thevalue},
function(output){
    $('#theeventmsg').html(output);
});
}
</script>
<div id='theeventmsg'></div>

//jquery ui对话(工作!)

<script>
// increase the default animation speed to exaggerate the effect
$.fx.speeds._default = 1000;
$(function() {
    $( "#dialog" ).dialog({
        autoOpen: true,
        show: "blind",
        hide: "explode"
    });
    $( "#opener" ).click(function() {
        $( "#dialog" ).dialog( "open" );
        return false;
    });
});
</script>

<div class="demo">
<div id="dialog" title="Basic dialog">
    <p>This is an animated dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
<button id="opener">Open Dialog</button>
</div><!-- End demo -->

能帮忙吗???非常感谢!!

试试这样的东西:

<script>
  $.fx.speeds._default = 1000;
  $(document).ready(function() {
    $( "#dialog" ).dialog({ autoOpen: false });
    $('#button').click(function () {
      var data = { ... };
      $.post('module/calendar/event_details.php', data, function (output) {
        $('#dialog p').html(output);
        $( "#dialog" ).dialog("open");
      });
    });
  });
</script>    
<div id="dialog">
  <p>content</p>
</div>
<button id="button">button</button>

或者:

<script>
  $(document).ready(function () {
    function eventdetail(thevalue) {
      $.post('event_details.php', { eid: thevalue }, function (output) {
        $('#dialog p').html(output);
        $("#dialog").dialog({ autoOpen: true });
      });
    }
    $('#button').click(function () { eventdetail('value'); });
  });  
</script>
<div id="dialog">
  <p>content</p>
</div>
<button id="button">button</button>