0

フルカレンダーを使用しています:-http: //arshaw.com/fullcalendar/

そして、jquery .postを使用してパラメーターを同じページに戻し、結果を生成しています。これはうまく機能しています。

同時に、jqueryuiダイアログを使用して表示されたコンテンツを保持したいと思います。公式サイトからサンプルコードを貼り付けている間、例は機能します。ただし、.post出力をダイアログと組み合わせると、成功しませんでした。

以下の2セットのスクリプトを組み合わせる際に助けを求めたいと思います。-

// .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 -->

助けられる???どうもありがとう!!

4

1 に答える 1

0

次のようなことを試してください:

<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>
于 2012-07-30T03:15:40.100 に答える