-1

そのようなことが可能かどうか知りたいです:

 x$().xhr('<?php echo $this->createUrl('survey/index', array('id'=>$model->skey)); ?>', {
                method: 'POST',
                async: true,
                data: urlstringserialize(serialize(document.getElementById("token-form"))),
                callback: function() {respOK(this.responseText);}
            });
            x$().xhr('<?php echo $this->createUrl('survey/saveBrowser', array('id'=>$model->skey,'browser'=>$browser->getBrowser(),'platform'=>$browser->getPlatform())); ?>', {
                method: 'POST',
                async: true,
                data: urlstringserialize(serialize(document.getElementById("token-form"))),
                callback: function() {respOK(this.responseText);}
            });

2 つの異なるコントローラー関数を順番に呼び出す必要があります。このようにして、最初のものだけが実行されます。

4

2 に答える 2

0
 function respOK(data) {
        <?php if($browser->getBrowser() == Browser::BROWSER_IE) { ?>
        <?php if($campaignCenter->campaign_id == 326) { ?>
            x$("style").remove(".type");
        <?php } ?>
            x$('div.surveyform').html(data);
        <?php } else  { ?>
        <?php if($campaignCenter->campaign_id == 326) { ?>
            x$("style").remove(".type");
        <?php } ?>
            x$('div.surveyform').tween({opacity:0, duration: 200}, function() {x$('div.surveyform').html(data); x$('div.surveyform').tween({opacity: 1, duration: 200});});
        <?php } ?>
    }
于 2015-10-20T19:13:59.220 に答える