mcp ファイルで実行する必要があるメソッドの宛先 URL として exp_actions から action_id を取得する JQuery で AJAX を使用してスクリプトを作成しています。参照は静的に行われます。次のような方法でビューで PHP 呼び出しを行うことにより、ACT 値を見つけることができますか?
$aid =$this->EE->cp->fetch_action_id('Class_name', 'method_name');
?
私のページは現在このようになっています:
<script type= "text/javascript">
$(document).ready(function() {
$('form').change(function(e){
var data = $(this).serializeArray();
console.log(data);
$.post(
<? echo'http://ourwebsite.com/ee/admin.php?ACT=44&id=4 ,';?>
data,
function() {
console.log(this);
}
)
});
});
前もって感謝します!